vendredi 28 octobre 2016

Ember observer / run schedule for each time a route is loaded

I have a property in an Ember controller which has an observer. This is called when I first visit the page / route and also when I change the a dropdown that the value is bound to (as expected).

What isn't happening, is the observer being fired when I re-visit the page and the value is re-set (to the same value it was when I left the page).

The reason I need this, is that the value is used as a filter for another function and that function is called inside the observer.

Is there a way to make an observer fire even if the value is the same as it was before? Or alternatively, a sensible way to fire a function (perhaps via the run loop) from a controller, each time the controller is loaded / route visited?




Aucun commentaire:

Enregistrer un commentaire