Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 7e77521

Browse files
docs(guide/di): further clarification of what can be injected
1 parent f66d654 commit 7e77521

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

docs/content/guide/di.ngdoc

+13-8
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,22 @@ DI is pervasive throughout Angular. You can use it when defining components or w
218218
and `config` blocks for a module.
219219

220220
- Components such as services, directives, filters and animations are defined by an injectable factory
221-
method or constructor function. These components can be injected with "service" components as
222-
dependencies.
221+
method or constructor function. These components can be injected with "service" and "value"
222+
components as dependencies.
223223

224-
- The `run` and `config` methods accept a function, which can also be injected with "service"
225-
components as dependencies. Note that only providers and constants can be injected into configuration
226-
blocks and only instances and constants can be injected into run blocks.
227-
See [Modules](https://docs.angularjs.org/guide/module#module-loading-dependencies) for additional details.
224+
- The `run` method accepts a function, which can be injected with "service", "value" and "constant"
225+
components as dependencies. Note that you cannot inject "providers" into `run` blocks.
226+
227+
- The `config` method accepts a function, which can be injected with "provider" and "constant"
228+
components as dependencies. Note that you cannot inject "service" or "value" components into
229+
configuration
228230

229231
- Controllers are defined by a constructor function, which can be injected with any of the "service"
230-
components as dependencies, but they can also be provided with special dependencies. See "DI in
231-
Controllers" below.
232+
and "value" components as dependencies, but they can also be provided with special dependencies. See
233+
{@link di#controllers Controllers} below for a list of these special dependencies.
234+
235+
See {@link module#module-loading-dependencies Modules} for more details about injecting dependencies
236+
into `run` and `config` blocks.
232237

233238

234239
### Factory Methods

0 commit comments

Comments
 (0)