0
votes

I have a model hook for /licenses route which returns this.store.find('license'). But template still shows old list of licenses (not the one returned from server, which contains few licenses than those there in store). I want to forcefully update model. How can I do it using setupcontroller hook? I read somewhere that we can set model from setupController hook to forcefully update model each time the template is loaded.

1

1 Answers

2
votes
setupController: function(controller, model) {
    controller.set('model', this.store.find('license'));
}

is this what you are looking for. This sets model for the required controller