multiple matching routes

后端 未结 5 1210
广开言路
广开言路 2021-01-31 06:22

I\'ve got a backbone.js application that defines two controllers, and the controllers both define route patterns which match the location.hash. I\'m having trouble getting both

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-31 07:02

    I've used namespacing to deal with a similar problem. Each module comes with it's own module controller, but is restricted to handle routes that start with /moduleName/ this way modules can be developed independently.

提交回复
热议问题