graph LR
Injector["Injector"]
Provider["Provider"]
_Injectable_decorator["@Injectable() decorator"]
Injector -- "uses" --> Provider
Injector -- "reads declarations from" --> _Injectable_decorator
Provider -- "configures" --> Injector
_Injectable_decorator -- "marks classes for" --> Injector
The Dependency Injection System subsystem in Angular is responsible for managing the creation, resolution, and lifecycle of injectable instances (services, components, directives). It acts as the core mechanism for providing dependencies throughout the application, promoting modularity and testability.
The core runtime mechanism responsible for resolving and providing dependencies. It maintains a collection of providers and instantiates dependencies as needed.
Related Classes/Methods:
A configuration object that instructs the Injector on how to obtain a value for a specific dependency token. Providers define the "recipe" for creating or providing an instance.
Related Classes/Methods:
A decorator that marks a class as a service that can be injected by the Angular DI system. It can also be used to configure providers for the decorated class.
Related Classes/Methods: