5 cool usages of inject function in Angular - Lightning talk
summary
Title claims five concrete patterns using Angular 14+ inject with code that actually runs: a short, working useOnDestroy helper that auto-completes observable streams; replacements for decorators with useHostBinding and a host-listener approach that can run outside zone for fewer change detection cycles; composable utilities that interoperate; and a more complex useOnChanges that turns input changes into a switchMap-able stream. The uploader includes a small homework set including a useHttpResource sketch.
AI-written summary · about
chapters (5)
- 0:00Managing observables
- 3:16Host binding alternatives
- 4:53Host listener utilities
- 6:21Reactive input changes
- 9:08Final thoughts and homework
related talks
46mAngular Dependency Injection – Understanding hierarchical injectors
57mAngular Dependency Injection, In Depth
29mDI Deep Dive
38mDependency Injection for Future Generations
18mFlexible data flow architecture in Angular
01h 00mAngular Dependency Injection In-Depth
28mUnleash The Power Of Angular With Knowledge of Patterns
29mHow to use Functional Programming with Angular and why it’s a good idea
