Angular Dependency Injection decorators - @Self()/@SkipSelf()/@Host()/@Optional()

Angular Dependency Injection decorators - @Self()/@SkipSelf()/@Host()/@Optional() Two Injector Hierarchies - Element Injector and Module Injector. Injector Resolution modifiers - @Self() - Search the Provider only in current component Element Injector @SkipSelf() - Search the Provider skipping the current component Element Injector @Host() - Search the Provider only in current component Element Injector or the embedded element (content projected parent) @Optional() - Provider is optional. Assigns null value to the injected service without breaking the application. Github url - N95 masks from Amazon - . Be safe. Redmi Note 11 - 00:00 - Introduction 00:30 - Injector Hierarchies 06:24 - @Self and @Optional 09:56 - @Host 12:33 - @SkipSelf
Back to Top