From 07733966cb96b2a3f2a014f2ba052d0421606552 Mon Sep 17 00:00:00 2001 From: Jeremy Elbourn Date: Mon, 30 Oct 2017 14:15:56 -0700 Subject: [PATCH] docs(dialog): don't say that entryComponents is for AOT only Fixes #8102 --- src/lib/dialog/dialog.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/dialog/dialog.md b/src/lib/dialog/dialog.md index e817549982de..5bbcabdc6ef6 100644 --- a/src/lib/dialog/dialog.md +++ b/src/lib/dialog/dialog.md @@ -96,14 +96,14 @@ You can control which elements are tab stops with the `tabindex` attribute -### AOT Compilation +### Configuring dialog content via `entryComponents` -Due to the dynamic nature of the `MatDialog`, and its usage of `ViewContainerRef#createComponent()` -to create the component on the fly, the AOT compiler will not know to create the proper -`ComponentFactory` for your dialog component by default. +Because `MatDialog` instantiates components at run-time, the Angular compiler needs extra +information to create the necessary `ComponentFactory` for your dialog content component. -You must include your dialog class in the list of `entryComponents` in your module definition so -that the AOT compiler knows to create the `ComponentFactory` for it. +For any component loaded into a dialog, you must include your component class in the list of +`entryComponents` in your NgModule definition so that the Angular compiler knows to create +the `ComponentFactory` for it. ```ts @NgModule({