controllerFor (name) Ember.Controller
public
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
.
1 2 3 4 5 6 | 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.