Angular Master (283 Qs)•Part 9: NgModules, Providers, NgZone & Injector Hierarchies (213 - 255)
Is it necessary for bootstrapped component to be entry component?
mid LevelCode ExampleDependency InjectionComponents
Yes, the bootstrapped component needs to be an entry component. This is because the bootstrapping process is an imperative process.
Practical Code Example
text
// Bootstrapped component as entry component:
// In ViewEngine (legacy), bootstrapped components were automatically added to entryComponents.
// In Ivy, entryComponents is obsolete.