Backbone.js Routers confusion (pushState: true, trailing slash)

徘徊边缘 提交于 2019-12-05 15:47:25

I think your 2nd attempt should work if you update backbone to the latest version. See this discussion:

https://github.com/documentcloud/backbone/pull/1505

The changes above were merged 8 days ago.

While @shioyama's answer is correct, I often bypass this strangeness by using wildcard routes, where possible.

For example:

routes:
  'dashboard(/*subroute)': 'index'

Of course, this is not a possibility for many apps, however, it's saved time for me in the past.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!