docs: update dynamic-component loading guide (#36959)

The 'entryComponents' array is no longer a special case for dynamic component loading because of the Ivy compiler.

PR Close #36959
This commit is contained in:
Bogdan Bogdanov 2020-05-06 21:02:26 +03:00 committed by Misko Hevery
parent 8bb8f98c28
commit 51aa4aa1c3

View File

@ -131,22 +131,6 @@ The `createComponent()` method returns a reference to the loaded component.
Use that reference to interact with the component by assigning to its properties or calling its methods. Use that reference to interact with the component by assigning to its properties or calling its methods.
{@a selector-references}
#### Selector references
Generally, the Angular compiler generates a `ComponentFactory`
for any component referenced in a template. However, there are
no selector references in the templates for
dynamically loaded components since they load at runtime.
To ensure that the compiler still generates a factory,
add dynamically loaded components to the `NgModule`'s `entryComponents` array:
<code-example path="dynamic-component-loader/src/app/app.module.ts" region="entry-components" header="src/app/app.module.ts (entry components)"></code-example>
{@a common-interface} {@a common-interface}