Route#didTransition event

didTransitionpublic

Defined in packages/ember-routing/lib/system/route.js:588
Available since 1.2.0

The didTransition action is fired after a transition has successfully been completed. This occurs after the normal model hooks (beforeModel, model, afterModel, setupController) have resolved. The didTransition action has no arguments, however, it can be useful for tracking page views or resetting state on the controller.

App.LoginRoute = Ember.Route.extend({
  actions: {
    didTransition: function() {
      this.controller.get('errors.base').clear();
      return true; // Bubble the didTransition event
    }
  }
});
doc_EmberJs
2016-11-30 16:53:07
Comments
Leave a Comment

Please login to continue.