mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-20 07:15:31 +08:00
docs(guide/di): clarify what "services" can be injected into .config() and .run()
Closes #8106
This commit is contained in:
committed by
Peter Bacon Darwin
parent
543cf1803b
commit
f66d6541b7
@@ -222,7 +222,9 @@ method or constructor function. These components can be injected with "service"
|
||||
dependencies.
|
||||
|
||||
- The `run` and `config` methods accept a function, which can also be injected with "service"
|
||||
components as dependencies.
|
||||
components as dependencies. Note that only providers and constants can be injected into configuration
|
||||
blocks and only instances and constants can be injected into run blocks.
|
||||
See [Modules](https://docs.angularjs.org/guide/module#module-loading-dependencies) for additional details.
|
||||
|
||||
- Controllers are defined by a constructor function, which can be injected with any of the "service"
|
||||
components as dependencies, but they can also be provided with special dependencies. See "DI in
|
||||
|
||||
Reference in New Issue
Block a user