mercredi 21 janvier 2015

ember-data model is not being deleted when transitioning a route

I need to delete a model when I leaving a route. I am using the following in the route:



actions : {
willTransition: function(transition){
//Cleanup search model
var model = this.modelFor('route1.index');
model.deleteRecord();
//At this point the model.get('isDeleted') = true
}
}


From ember inspector when I have transitioned to my new route route1.route2, I can still see the model and its isDeleted property is now false.


Why is this not working?





Aucun commentaire:

Enregistrer un commentaire