mercredi 4 mars 2015

Multiple didTransition hooks in route

Is there a way to have multiple functions that are all called on a route's didTransition event?


Here is an example where the actions.didTransition is run normally, but "someHook" is not: http://ift.tt/1KieTHs


Is running arbitrary functions even supposed to be possible by using ".on()"?


Have I misunderstood what an event means in this case?


The reason I wanted to do this is because I wanted to make a mixin that would get added to certain routes that would then do some general setup after didTransition, but the routes would also need to do some custom setup as well. I can copy-paste the same bit of code into each route's actions.didTransition, but I'd rahter have it only in one place.





Aucun commentaire:

Enregistrer un commentaire