I’m wondering how should I implement the following use case with emberjs:
Imagine an app matching thoses routes:
/blog/archives
/blog/article/1
In both routes, the user can click on a button which displays the last published comments on the blog in a little modalbox docked in the bottom right corner (it’s just an example!).
I want to persist the state of this modalbox based on a hash in the URL:
/blog/archives?state=/comments/1
/blog/article/1?state=/comments/1
Maybe I need to use multiples routers with each one handling a specific part of the URL.
Is something available for this use case in Ember.js?
How would you do something like that?
I don’t think Ember
Routeris made for be used several times at the same time. Use one router should satisfy all your needs, but…At this moment, the
Routerdoes not allow query-string parameters, but I suggest you to take a look at this issues: