|
221 | 221 | |213| [What is an entry component?](#what-is-an-entry-component)|
|
222 | 222 | |214| [What is a bootstrapped component?](#what-is-a-bootstrapped-component)|
|
223 | 223 | |215| [How do you manually bootstrap an application?](#how-do-you-manually-bootstrap-an-application)|
|
224 |
| -|216| [?](#)| |
225 |
| -|217| [?](#)| |
226 |
| -|218| [?](#)| |
227 |
| -|219| [?](#)| |
| 224 | +|216| [Is it necessary for bootstrapped component to be entry component?](#is-it-necessary-for-bootstrapped-component-to-be-entry-component)| |
| 225 | +|217| [What is a routed entry component?](#what-is-a-routed-entry-component#)| |
| 226 | +|218| [Why is not necessary to use entryComponents array every time?](#why-is-not-necessary-to-use-entrycomponents-array-every-time)| |
| 227 | +|219| [Do I still need to use entryComponents array in Angular9?](do-i-still-need-to-use-entrycomponents-array-in-angular9#)| |
228 | 228 | |220| [?](#)|
|
229 | 229 | |221| [?](#)|
|
230 | 230 | |222| [?](#)|
|
|
3238 | 3238 |
|
3239 | 3239 | **[⬆ Back to Top](#table-of-contents)**
|
3240 | 3240 |
|
3241 |
| -216. ### ? |
| 3241 | +216. ### Is it necessary for bootstrapped component to be entry component? |
| 3242 | + Yes, the bootstrapped component needs to be an entry component. This is because the bootstrapping process is an imperative process. |
3242 | 3243 |
|
3243 | 3244 | **[⬆ Back to Top](#table-of-contents)**
|
3244 | 3245 |
|
3245 |
| -217. ### ? |
| 3246 | +217. ### What is a routed entry component? |
| 3247 | + The components referenced in router configuration are called as routed entry components. This routed entry component defined in a route definition as below, |
| 3248 | + ```js |
| 3249 | + const routes: Routes = [ |
| 3250 | + { |
| 3251 | + path: '', |
| 3252 | + component: TodoListComponent // router entry component |
| 3253 | + } |
| 3254 | + ]; |
| 3255 | + ``` |
| 3256 | + Since router definition requires you to add the component in two places (router and entryComponents), these components are always entry components. |
| 3257 | + **Note:** The compilers are smart enough to recognize a router definition and automatically add the router component into `entryComponents`. |
3246 | 3258 |
|
3247 | 3259 | **[⬆ Back to Top](#table-of-contents)**
|
3248 | 3260 |
|
3249 |
| -218. ### ? |
| 3261 | +218. ### Why is not necessary to use entryComponents array every time? |
| 3262 | + Most of the time, you don't need to explicity to set entry components in entryComponents array of ngModule decorator. Because angular adds components from both @NgModule.bootstrap and route definitions to entry components automatically. |
3250 | 3263 |
|
3251 | 3264 | **[⬆ Back to Top](#table-of-contents)**
|
3252 | 3265 |
|
3253 |
| -219. ### ? |
| 3266 | +219. ### Do I still need to use entryComponents array in Angular9? |
| 3267 | + No. In previous angular releases, the entryComponents array of ngModule decorator is used to tell the compiler which components would be created and inserted dynamically in the view. In Angular9, this is not required anymore with Ivy. |
3254 | 3268 |
|
3255 | 3269 | **[⬆ Back to Top](#table-of-contents)**
|
3256 | 3270 |
|
|
0 commit comments