lundi 4 avril 2016

Ember Model hook

I have a ressource wich has the ussual routes. (index, show, delete, ressoure-name,...)
In one special case, I want that the model hook gets called in the ressource-name route and not in the index route.
Use case: I have a search field, which is in another template. When a user is looking for something, I want to handle the action varying to the current ressource. So, when my ressource is displayed in the index route, I want handle the input in the action that is defined in the ressource-name.js. There I call for a transition with queryParams and the model hooks gets called. But the index model hook gets called to, and this overwrites my model. How can I prevent this?




Aucun commentaire:

Enregistrer un commentaire