mardi 31 mars 2015

how to change upstream route, preserving subroutes in ember?

Say you have a router like so:



@resource 'products', ->
@resource 'product', { path: /product/:product_id } ->
@route 'description'


and you're currently in the


http://ift.tt/19xYOwL URL.


From this location, if you click a link to a different product, how do you modify that link so that the resulting page is not


root.com/products/37


but rather


http://ift.tt/1I13JVv?


I want to preserve the subroutes, as you can see. Or is there a better way to do this, for example, using an application controller property that gets passed around to every descendant route/controller?





Aucun commentaire:

Enregistrer un commentaire