刷新与URL相同的哈希BackboneJS? [英] Refresh BackboneJS on with same URL hash?
本文介绍了刷新与URL相同的哈希BackboneJS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前的主干应用程序有一个网址:
My current backbone application has a url:
localhost/#users
是否有访问方式本地主机/#用户
而在网址本地主机/#用户
所以它刷新网页?
Is there a way to access localhost/#users
while at the URL localhost/#users
so it refreshes the page?
目前,当我在本地主机/#用户
我尝试
window.location.hash = #users
或 myBackboneRouter.navigate(用户)
它不会触发页面刷新。
推荐答案
我觉得 myBackboneRouter.navigate(用户,{触发:真})
会做什么你想要的。
I think myBackboneRouter.navigate("users", {trigger: true})
will do what you want.
这篇关于刷新与URL相同的哈希BackboneJS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文