Angular & Signals (283 Qs)•Part 9: NgModules, Providers, NgZone & Injector Hierarchies (213 - 255)
What is an entry component?
An entry component is any component that Angular loads imperatively(i.e, not referencing it in the template) by type. Due to this behavior, they can’t be found by the Angular compiler during compilation. These components created dynamically with ComponentFactoryResolver.
Basically, there are two main kinds of entry components which are following -
- The bootstrapped root component
- A component you specify in a route
Practical Code Example
typescript
// Entry Component: Component dynamically loaded imperatively rather than referenced in HTML template.
// In Angular Ivy (v9+), ALL components are entry components by default!