I’m working on a documented sample page. I have a search page with a search box. Upon initiating a search, a transitionTo occurs to ‘…/search/«text»’, for example, '…/search/banana/"
- a serialize which puts the search box text in the URL
- a model hook which puts the URL text back in the search box.
- a setupController hook which performs the search and places the results in the model.
However, the setupController hook isn’t always called. Right now, I have a hack in my model hook which returns the current timestamp, to make sure that Ember recognizes the model has changed and calls setupController (at least, I’m assuming that’s what happens).
Returning a timestamp seems incredibly hacky - is there a better way to make sure that setupController is called every single time?