Route#deactivate event

deactivatepublic Defined in packages/ember-routing/lib/system/route.js:712 Available since 1.9.0 This event is triggered when the router completely exits this route. It is not executed when the model for the route changes. App.IndexRoute = Ember.Route.extend({ trackPageLeaveAnalytics: function(){ trackPageLeaveAnalytics(); }.on('deactivate') });

Route#deserialize()

deserialize (params, transition) Object|Promiseprivate Defined in packages/ember-routing/lib/system/route.js:1506 Parameters: params Object the parameters extracted from the URL transition Transition Returns: Object|Promise the model for this route. Router.js hook.

Route#controllerName

controllerNameStringpublic Defined in packages/ember-routing/lib/system/route.js:525 Available since 1.4.0 The name of the controller to associate with this route. By default, Ember will lookup a route's controller that matches the name of the route (i.e. App.PostController for App.PostRoute). However, if you would like to define a specific controller to use, you can do so using this property. This is useful in many ways, as the controller specified will be: passed to the setupController me

Route#deactivate()

deactivatepublic Defined in packages/ember-routing/lib/system/route.js:868 This hook is executed when the router completely exits this route. It is not executed when the model for the route changes.

Route#controller

controllerEmber.Controllerpublic Defined in packages/ember-routing/lib/system/route.js:729 Available since 1.6.0 The controller associated with this route. Example App.FormRoute = Ember.Route.extend({ actions: { willTransition: function(transition) { if (this.controller.get('userHasEnteredData') && !confirm('Are you sure you want to abandon progress?')) { transition.abort(); } else { // Bubble the `willTransition` action so that //

Route#controllerFor()

controllerFor (name) Ember.Controllerpublic Defined in packages/ember-routing/lib/system/route.js:1672 Returns the controller for a particular route or name. The controller instance must already have been created, either through entering the associated route or using generateController. App.PostRoute = Ember.Route.extend({ setupController: function(controller, post) { this._super(controller, post); this.controllerFor('posts').set('currentPost', post); } }); Parameters: name

Route#beforeModel()

beforeModel (transition) Promisepublic Defined in packages/ember-routing/lib/system/route.js:1257 This hook is the first of the route entry validation hooks called when an attempt is made to transition into a route or one of its children. It is called before model and afterModel, and is appropriate for cases when: 1) A decision can be made to redirect elsewhere without needing to resolve the model first. 2) Any async operations need to occur first before the model is attempted to be resolve

Route#contextDidChange()

contextDidChangeprivate Defined in packages/ember-routing/lib/system/route.js:1395 Called when the context is changed by router.js.

Route#activate()

activatepublic Defined in packages/ember-routing/lib/system/route.js:877 This hook is executed when the router enters the route. It is not executed when the model for the route changes.

Route#afterModel()

afterModel (resolvedModel, transition) Promisepublic Defined in packages/ember-routing/lib/system/route.js:1334 This hook is called after this route's model has resolved. It follows identical async/promise semantics to beforeModel but is provided the route's resolved model in addition to the transition, and is therefore suited to performing logic that can only take place after the model has already resolved. App.PostsRoute = Ember.Route.extend({ afterModel: function(posts, transition) {