Skip to content

Instantly share code, notes, and snippets.

@AmilKey
Created December 14, 2015 20:04
Show Gist options
  • Select an option

  • Save AmilKey/cb9be3ddcd3b1ed8c799 to your computer and use it in GitHub Desktop.

Select an option

Save AmilKey/cb9be3ddcd3b1ed8c799 to your computer and use it in GitHub Desktop.
Router Request Lifecycle
http://blog.trackets.com/2013/02/08/router-request-lifecycle.html
Router Request Lifecycle
enter (private)
activate - executed when entering the route
deserialize (private)
model (formely deserialize) - takes the params and returns a model which is set to the route's currentModel
serialize - used to generate dynamic segments in the URL from a model
setupController - takes currentModel and sets it to the controller's content by default
renderTemplate - takes current controller and what model returns and renders the template with an appropriate name
deactivate - executed when exiting the route (called by exit internally)
exit (private, requires call to this._super)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment