Skip to content

Commit 23513bd

Browse files
committed
fix(material/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 71b7b15 commit 23513bd

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
@@ -271,7 +271,8 @@ export abstract class _MatDialogBase<C extends _MatDialogContainerBase> implemen
271271
} else {
272272
const injector = this._createInjector<T>(config, dialogRef, dialogContainer);
273273
const contentRef = dialogContainer.attachComponentPortal<T>(
274-
new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));
274+
new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector,
275+
config.componentFactoryResolver));
275276
dialogRef.componentInstance = contentRef.instance;
276277
}
277278

0 commit comments

Comments
 (0)