October 2017
Intermediate to advanced
280 pages
6h 50m
English
Having the declaration of all the providers in the same place might be quite inconvenient. For example, imagine we're developing a large-scale application that has hundreds of components depending on thousands of services. In this case, configuring all the providers in the root component is not a practical solution. There will be name collisions when two or more providers are associated with the same token. The configuration will be huge, and it will be hard to trace where the different dependencies need to be injected.
As we mentioned, Angular's @Directive (and @Component) decorator allows us to declare a set of providers for the element injector corresponding to a given directive using the ...
Read now
Unlock full access