forked from angular/code.angularjs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev_guide.di.html
31 lines (24 loc) · 1.66 KB
/
dev_guide.di.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<h1>Developer Guide: About Dependency Injection (DI)</h1>
<div class="developer-guide-about-dependency-injection-di-"><fieldset class="workInProgress"><legend>Work in Progress</legend>
This page is currently being revised. It might be incomplete or contain inaccuracies.</fieldset>
<p>Dependency Injection (DI) is an object-oriented software design pattern that supports the
decoupling and dependency management of application components.</p>
<p>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.</p>
<p>Angular has a built-in dependency management subsystem that helps to make your applications easier
to develop, understand, and test.</p>
<p>For more information on DI in general, see <a href="http://en.wikipedia.org/wiki/Dependency_injection">Dependency Injection</a> at Wikipedia, and <a href="http://martinfowler.com/articles/injection.html">Inversion of Control</a> by Martin Fowler, or read about DI in your favorite software design pattern
book.</p>
<h3>Related Topics</h3>
<ul>
<li><a href="#!/guide/dev_guide.di.understanding_di">Understanding DI in Angular</a></li>
<li><a href="#!/guide/dev_guide.services">Angular Services</a></li>
</ul>
<h3>Related API</h3>
<ul>
<li><a href="#!/api/angular.service"><code>Service API</code></a></li>
<li><a href="#!/api/angular.injector"><code>Angular Injector API</code></a></li>
</ul></div>