resetController (controller, isExiting, transition) public
Defined in packages/ember-routing/lib/system/route.js:444 Available since 1.7.0
A hook you can use to reset controller values either when the model changes or the route is exiting. App.ArticlesRoute = Ember.Route.extend({
// ...
resetController: function(controller, isExiting, transition) {
if (isExiting) {
controller.set('page', 1);
}
}
});
Parameters:
controller Controller
instance
isExiting Boolean