mardi 4 août 2015

Is there a way to find out from which route it was transitioned to the current route in Ember?

Let's say we have 3 routes: A, B and C

There is a possibility to transition from A to C. Or from B to C.

A -> C
B -> C

In route C I would like to know from which route it was transitioned. Either A or B. Is there a easy way to find that?

P.S. What I'm thinking of doing is to add an extra parameter with the route name (A or B) when transitioning from A (or B) to C and get that parameter on the beforeModel hook of route C.




Aucun commentaire:

Enregistrer un commentaire