Skip to content

Injectors

An injector is responsible for creating and delivering service instances. Angular creates a tree of injectors that mirrors the component hierarchy.

Root Injector (app-level)
├── Lazy Module Injector
│ └── Component Injector
│ └── Child Component Injector
└── Eager Module Injector

Angular looks for a provider at the current level, then walks up the injector tree until it finds one. If none found, throws NullInjectorError.”