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 method.
  • used as the controller for the template being rendered by the route.
  • returned from a call to controllerFor for the route.

Default: null

doc_EmberJs
2016-11-30 16:53:06
Comments
Leave a Comment

Please login to continue.