Answer the question
In order to leave comments, you need to log in
How to overload the route model in EmberJS from controllera?
there is Controller
export default Ember.Controller.extend({
surveysApi : Ember.inject.service('surveys-api'),
actions: {
deleteSurveys(id){
this.get('surveysApi').deleteSurvey(id);
}
}
});
model(){
this.set("disqus",[]);
return this.get('surveysApi').getSurveys().then(result => {
disqus = result;
return disqus;
});
},
Answer the question
In order to leave comments, you need to log in
Added in the route:
actions: {
refreshModel() {
this.refresh();
}
}
this.send('refreshModel');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question