mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The directiveIntrospector was a bit of a hack to allow the router to read the `$routeConfig` annocation and `$routerCanActivate` hook from directives when they were registered. It turns out that if we put these properties on the component controller's constructor function (i.e. as static class methods) then we can simply use the `$injector` to access it as required. Currently, people put the properties directly on their component definition objects. In Angular 1.5.1, we will copy these properties onto the controller constructor to maintain a simple migration path. But going forward it may be better to encourage people to add the properties directly to the controller constructor. |
||
|---|---|---|
| .. | ||
| lib | ||
| src | ||
| test | ||
| build.js | ||
| index.html | ||
| karma-router.conf.js | ||
| tsd.json | ||