vendredi 20 mai 2016

Ember - How to reload route model after save/update records

I want to reload my route model after save/update action in the route.js file. Following is my route model.

export default Ember.Route.extend({

model() {
  return Ember.RSVP.hash({
        employeeList : this.store.findAll('employee'),
        employee : this.store.createRecord("employee"),
      });
}

I tried following and it doesn't worked.

this.refresh(); // I saw this in many posts.

Can anyone suggest how to reload a model after save/update operation?




Aucun commentaire:

Enregistrer un commentaire