mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
32 lines
1.3 KiB
Text
32 lines
1.3 KiB
Text
@ngdoc overview
|
|
@name Developer Guide: About Dependency Injection (DI)
|
|
@description
|
|
|
|
Dependency Injection (DI) is an object-oriented software design pattern that supports the
|
|
decoupling and dependency management of application components.
|
|
|
|
The idea behind DI is to decouple each component from all of the other components that it depends
|
|
on to do its particular job. The way this is done in DI is by moving the responsibility for
|
|
managing dependencies out of each individual component and into a provider component. The provider
|
|
(or injector) component manages the life cycles and dependencies for all of the other components in
|
|
an application.
|
|
|
|
Angular has a built-in dependency management subsystem that helps to make your applications easier
|
|
to develop, understand, and test.
|
|
|
|
For more information on DI in general, see {@link http://en.wikipedia.org/wiki/Dependency_injection
|
|
Dependency Injection} at Wikipedia, and {@link http://martinfowler.com/articles/injection.html
|
|
Inversion of Control} by Martin Fowler, or read about DI in your favorite software design pattern
|
|
book.
|
|
|
|
|
|
## Related Topics
|
|
|
|
* {@link dev_guide.di.understanding_di Understanding DI in Angular}
|
|
* {@link dev_guide.services Angular Services}
|
|
|
|
|
|
## Related API
|
|
|
|
* {@link api/angular.module.NG Service API}
|
|
* {@link api/angular.injector Angular Injector API}
|