【发布时间】:2017-12-19 09:06:40
【问题描述】:
我查看我的主干模块
网址。 但我需要查看另一个模块,例如
注意:
我的主干视图正在使用Backbone.history.navigate(another_module, {trigger:true});,但它给了我一个类似的 URL
【问题讨论】:
-
我详细解释how the routing works with Backbone,剧透警告:这只是链接。
我查看我的主干模块
网址。 但我需要查看另一个模块,例如
注意:
我的主干视图正在使用Backbone.history.navigate(another_module, {trigger:true});,但它给了我一个类似的 URL
【问题讨论】:
你为什么不这样尝试。
Backbone.history.navigate("test_module/another_module", { trigger: true });
阅读documentation on navigate了解更多信息。
【讨论】:
在使用主干进行开发时,您应该使用Backbone Routers 作为最佳选择。您可以通读文档以获得更好的理解。
【讨论】: