test(angular_1_router): apply annotations to controller constructors
Until Angular 1.5.1 is released, the `$routeConfig` and `$routerCanActivate` annotations for components must live on the controller constructor. In Angular 1.5.1, it will automatically copy these annotations across from the component definition file. Closes #7319
This commit is contained in:

committed by
Pete Bacon Darwin

parent
83f0e7c975
commit
7f22bd62ab
2
modules/angular1_router/src/ng_route_shim.js
vendored
2
modules/angular1_router/src/ng_route_shim.js
vendored
@ -150,7 +150,7 @@
|
||||
}];
|
||||
|
||||
// we resolve the locals in a canActivate block
|
||||
componentDefinition.$canActivate = function() {
|
||||
componentDefinition.controller.$canActivate = function() {
|
||||
var locals = angular.extend({}, routeCopy.resolve);
|
||||
|
||||
angular.forEach(locals, function(value, key) {
|
||||
|
Reference in New Issue
Block a user