Newbie question: make route update its model?


So, I have a route, and it has a model() function that returns a look up from the Ember Data store to display in a table.

I’m able to make a “search” action that a child component can call succesfully with search terms, but I’m not sure what the syntax looks like for then forcing an update, so that it calls instead of the original… do I modify the model() function so that it knows if it’s in “display all results vs display search results” mode, and then do something to makes the route refresh and call model(), or can something in my search() action say “stop using the usual results of model() and use the results of instead?”

Thanks! Just trying to get my head around this kind of noun-not-verb programming :grin:


You might find this article of interest: Creating A Better Search Experience With Ember


Could people who are more fluent in ember take a look at this, that describes what I ended up doing, and point out any trips or traps I might have fallen for?