If you have ever contributed to building an Angular application, you probably already know about Dependency injection. It is one of the features that differentiates Angular from other frameworks and libraries.
The overall concept is simple; we define a simple ES2015/TS class and ask for it instances by specifying them as parameters of service or component constructors. Angular's DI mechanism will then provide them at runtime.
In this talk we will discuss some more advanced topics like:
Dependency Injection tree
Overwriting a Service in component Tree
Value and Factory Provider
Using an Abstract Class as a DI Token
Controlling the lookup with @Host @SkipSelf and @Optional.
Avoid Multiple Service Instances in Lazy Loaded Modules
Format
Long (=~ 20mn)
Description
If you have ever contributed to building an Angular application, you probably already know about Dependency injection. It is one of the features that differentiates Angular from other frameworks and libraries. The overall concept is simple; we define a simple ES2015/TS class and ask for it instances by specifying them as parameters of service or component constructors. Angular's DI mechanism will then provide them at runtime.
In this talk we will discuss some more advanced topics like:
Slides : https://slides.com/chihab/ngmorocco-dependency-injection/fullscreen Source code : https://github.com/chihab/ngx-library-di