Skip to content

Commit eaa737c

Browse files
committed
fix(dialog): use passed in ComponentFactoryResolver to resolve dialog content
Currently the `ComponentFactoryResolver` from the dialog config is only used for the dialog container. These changes switch to also use it for the dialog content component. Fixes #17702.
1 parent cb8de61 commit eaa737c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/material/dialog/dialog.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ export abstract class _MatDialogBase<C extends _MatDialogContainerBase> implemen
257257
} else {
258258
const injector = this._createInjector<T>(config, dialogRef, dialogContainer);
259259
const contentRef = dialogContainer.attachComponentPortal<T>(
260-
new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));
260+
new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector,
261+
config.componentFactoryResolver));
261262
dialogRef.componentInstance = contentRef.instance;
262263
}
263264

0 commit comments

Comments
 (0)