@@ -29,7 +29,7 @@ and "value" components as dependencies, but they can also be provided with speci
29
29
components as dependencies. Note that you cannot inject "providers" into `run` blocks.
30
30
31
31
- The `config` method accepts a function, which can be injected with "provider" and "constant"
32
- components as dependencies. Note that you cannot inject "service" or "value" components into
32
+ components as dependencies. Note that you cannot inject "service" or "value" components into
33
33
configuration.
34
34
35
35
See {@link module#module-loading-dependencies Modules} for more details about `run` and `config`
@@ -56,8 +56,8 @@ angular.module('myModule', [])
56
56
57
57
### Module Methods
58
58
59
- We can specify functions to run at configuration and run time for a module by calling the `run` and
60
- `config ` methods. These functions are injectable with dependencies just like the factory functions
59
+ We can specify functions to run at configuration and run time for a module by calling the `config`
60
+ and `run ` methods. These functions are injectable with dependencies just like the factory functions
61
61
above.
62
62
63
63
```js
@@ -93,8 +93,9 @@ Moreover, additional dependencies are made available to Controllers:
93
93
* {@link scope `$scope`}: Controllers are associated with an element in the DOM and so are
94
94
provided with access to the {@link scope scope}. Other components (like services) only have
95
95
access to the {@link $rootScope `$rootScope`} service.
96
- * {@link `$route`} resolves: If a controller is instantiated as part of a route, then any values that
97
- are resolved as part of the route are made available for injection into the controller.
96
+ * {@link ngRoute.$routeProvider#when resolves}: If a controller is instantiated as part of a route,
97
+ then any values that are resolved as part of the route are made available for injection into the
98
+ controller.
98
99
99
100
100
101
## Dependency Annotation
@@ -128,8 +129,6 @@ parameters in the function declaration.
128
129
129
130
### `$inject` Property Annotation
130
131
131
- Rather than pass an array to the `controller
132
-
133
132
To allow the minifiers to rename the function parameters and still be able to inject the right services,
134
133
the function needs to be annotated with the `$inject` property. The `$inject` property is an array
135
134
of service names to inject.
@@ -175,7 +174,7 @@ However this method will not work with JavaScript minifiers/obfuscators because
175
174
rename parameters.
176
175
177
176
Tools like [ng-annotate](https://github.com/olov/ng-annotate) let you use implicit dependency
178
- annotations in your app and automatically add annotations array notation prior to minifying.
177
+ annotations in your app and automatically add inline array annotations prior to minifying.
179
178
If you decide to take this approach, you probably want to use `ng-strict-di`.
180
179
181
180
Because of these caveats, we recommend avoiding this style of annotation.
0 commit comments