October 2017
Intermediate to advanced
280 pages
6h 50m
English
Under the hood, Angular will create injectors for all the directives and components, and add a default set of providers to them. These are the so called element injectors and are something the framework takes care of itself. The injectors associated with the components are called host injectors. One of the providers in each element injector is associated with the ElementRef token; it will return a reference to the host element of the directive. But what about the provider for the Overlay class? Let's take a look at the implementation of the top-level component:
@Component({
// ...
providers: [Overlay]
})
class App {}
We configure the element injector for the App component by declaring the providers property ...
Read now
Unlock full access