Skip to content

Commit 10c1c06

Browse files
jelbournmmalerba
authored andcommitted
docs(dialog): don't say that entryComponents is for AOT only (#8133)
Fixes #8102
1 parent 804f925 commit 10c1c06

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib/dialog/dialog.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ You can control which elements are tab stops with the `tabindex` attribute
9696

9797
<!-- example(dialog-content) -->
9898

99-
### AOT Compilation
99+
### Configuring dialog content via `entryComponents`
100100

101-
Due to the dynamic nature of the `MatDialog`, and its usage of `ViewContainerRef#createComponent()`
102-
to create the component on the fly, the AOT compiler will not know to create the proper
103-
`ComponentFactory` for your dialog component by default.
101+
Because `MatDialog` instantiates components at run-time, the Angular compiler needs extra
102+
information to create the necessary `ComponentFactory` for your dialog content component.
104103

105-
You must include your dialog class in the list of `entryComponents` in your module definition so
106-
that the AOT compiler knows to create the `ComponentFactory` for it.
104+
For any component loaded into a dialog, you must include your component class in the list of
105+
`entryComponents` in your NgModule definition so that the Angular compiler knows to create
106+
the `ComponentFactory` for it.
107107

108108
```ts
109109
@NgModule({

0 commit comments

Comments
 (0)