generateController (name, model) private
Generates a controller for a route.
Example
App.PostRoute = Ember.Route.extend({
setupController: function(controller, post) {
this._super(controller, post);
this.generateController('posts', post);
}
});
Parameters:
-
name
String - the name of the controller
-
model
Object - the model to infer the type of the controller (optional)
Please login to continue.