Angular Dependency Injection, In Depth
summary
Claim: Angular popularized browser dependency injection around 2010 and mirrors Spring/Java patterns while adding hierarchical injectors and component-scoped providers. Demo builds a car/engine/tires app using provider types useClass, useFactory, useValue, useExisting, shows that providedIn: 'root' is shorthand, that TypeScript interfaces are erased so use base classes, and that the Injector API works programmatically via inject()/runInInjectionContext. Live code runs successfully, component-level providers produce different instances, and optional/skipSelf/self/host modifiers change resolution.
AI-written summary · about
chapters (9)
- 0:00Introduction and background
- 2:36History of dependency injection
- 8:34Basic dependency injection
- 17:21Programmatic injector usage
- 25:46Hierarchical injectors
- 34:10Advanced scoping and configuration
- 44:35Injecting with directives
- 48:43Injection context and APIs
- 51:55Conclusion and Q&A
related talks
46mAngular Dependency Injection – Understanding hierarchical injectors
01h 00mAngular Dependency Injection In-Depth
29mDI Deep Dive
38mDependency Injection for Future Generations
17mDissecting Dependency Injection: Angular and NestJS
23mDependency Injection in Nest and Angular: Intersection & Mismatch
27mDemystifying Dependency Injection: Angular vs NestJS
30mClimbing up injector trees
