angular/angular.js — pull request #4242 by willmendesneto (2013-10-03 02:55:07+00:00)
Title: Add route params support in controller definition

Provide route params support in controller definition, using route params for set the application controller and another behaviours.

Default behaviour:

$routeProvider
// Default call
.when('/main', {
templateUrl: 'views/angular-smart-table.html',
controller: 'MainCtrl'
});

Behaviour using route params support:

$routeProvider
// Default call
.when('/:section', {
templateUrl: function(req) {
return 'views/' + req.section + '.html';
},
controller: function(req) {
return req.section+ 'Ctrl';
}
});