小编use*_*256的帖子

Backbone.history.navigate(url,{trigger:true,replace:true})

我使用此方法导航到url,触发事件而不是将url推送到浏览器历史记录.但是Backbone.history.navigate(url,{trigger:true, replace: true})从历史中替换以前的URL.示例:浏览器hystory

之前

localhost:port/url

Backbone.history.navigate(url + '/list',{ trigger:true, replace: true })

预期:路由触发事件url + '/list'和浏览器历史记录localhost:port/url 实际上:触发事件但浏览器历史记录localhost:port/#url/list.以前的网址被替换

javascript url browser-history backbone.js

9
推荐指数
1
解决办法
2万
查看次数

标签 统计

backbone.js ×1

browser-history ×1

javascript ×1

url ×1