DI Deep Dive
summary
Covers how Angular’s injector is a token->instance store that uses TypeScript types at compile time (hence @Injectable/@Component) instead of AngularJS’s fragile string keys which can be accidentally overwritten. Shows creating non-class keys with InjectionToken, the registration options useClass / useValue / useFactory / useExisting, and using ngUpgrade’s $injector via useFactory to adapt AngularJS services. Explains hierarchical injectors and how component-level providers give each component its own service instance.
AI-written summary · about
chapters (11)
- 0:00Introduction and welcome
- 1:04Speaker background
- 2:57Problems with manual injection
- 5:10Detailed drawbacks
- 9:35Introduction to DI
- 10:48AngularJS dependency system
- 14:14Angular 2+ DI system
- 17:31Registration and providers
- 20:32Advanced injection techniques
- 25:30Component-level providers
- 28:22Summary and conclusion
related talks
01h 00mAngular Dependency Injection In-Depth
57mAngular Dependency Injection, In Depth
46mAngular Dependency Injection – Understanding hierarchical injectors
38mDependency Injection for Future Generations
39mDeep DI-ving: how Angular's DI system defeated a monolith
17mDissecting Dependency Injection: Angular and NestJS
30mClimbing up injector trees
23mDependency Injection in Nest and Angular: Intersection & Mismatch
