-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
sub-routes? #62
Comments
+1 |
Just wrote a blog on this topic: Also created a Github repo for a Backbone.Subroute plugin: Feedback welcome! Still have to write some tests for this plugin, but seems to be working well for me so far. |
+1 for this. I was thinking something that's along the line of @geekdave's approach. |
i'd love to see someone send in a pull request for this. every time i think i need it, i find that there's something else in my application that isn't set up right, and I after I fix that I realize that I don't need sub-routes. i still think there's something worthwhile here, but the apps that i've been building so far are rather flat in terms of routing needs. |
I found this in the documentation:
I suppose if you split things up in to multiple routers by subroutes, you could achieve similar effect. |
@chancancode that's how i approach routers and modules, which is a big reason why i don't need sub-routes. my routers tend to be so small and focused that it's just not an issue for me to add the root folder to the paths. sure, it would be slightly less to type in some cases again - if anyone wants to send in a pull request :) otherwise, i think i'm going to close this one soon |
closing this as it doesn't seem to be a pressing issue for anyone (myself included). i'd recommend using geekdave's solution |
see #1177 for a unified discussion about the router. |
a client showed me some code to do sub-routes... routes that only match below a specified root. instead of:
someRoot/someResource/:id
we could do
someResource/:id
and specify a
root: 'someRoot'
in the configuration or initializer options for the router.thinking about this for Marionette's app router.
The text was updated successfully, but these errors were encountered: