vendredi 6 février 2015

How to fire ember.js action on navigating away from a page?

I have a searchbar that is intended to be similar to facebook's searchbar. At this point, it is functional, and on clicking, say "John Smith" from the list of results, my application displays the John Smith user page. Like Facebook's interface, the top navigation bar - where the searchbar is located - stays.


When displaying the John Smith userpage, the searchbar, instead of being blank, displays "John Smith". Now, when I navigate away from this page, I need to clear this searchbar.


How do I, therefore, fire an action when the user navigates away from this particular route?





Aucun commentaire:

Enregistrer un commentaire