Developer Guide: About Dependency Injection (DI)

Work in Progress This page is currently being revised. It might be incomplete or contain inaccuracies.

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 Dependency Injection at Wikipedia, and Inversion of Control by Martin Fowler, or read about DI in your favorite software design pattern book.

Related Topics

Related API