controllerFor (name) Ember.Controllerpublic
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
String - the name of the route or controller
Please login to continue.