Route#generateController()

generateController (name, model) private

Defined in packages/ember-routing/lib/system/route.js:1711

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)
doc_EmberJs
2016-11-30 16:53:08
Comments
Leave a Comment

Please login to continue.