emberjs/ember.js — pull request #2955 by pangratz (2013-07-04 15:22:43+00:00)
Title: Specify controller of a route via controllerName

This commit adds the possibility to specify the controller a route shall use via a `controllerName` property.

Given the following app

``` javascript
App.Router.map(function() {
this.resource('team', function() {
this.route('overview');
this.route('detail');
});
});

App.TeamController = Ember.ObjectController.extend({ ... });

App.TeamOverviewRoute = Ember.Route.extend({ controllerName: 'team' });
```

the controller in the `team/overview` template is the `App.TeamController` instead of the generated `App.TeamOverviewController`. Since the `controllerName` isn't set on the `App.TeamDetailRoute`, in this
template the generated `App.TeamDetailController` is used.

This addresses #1872.