Skip to content

Commit

Permalink
fix(dialog): use passed in ComponentFactoryResolver to resolve dialog…
Browse files Browse the repository at this point in the history
… 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 angular#17702.
  • Loading branch information
crisbeto committed Aug 12, 2020
1 parent cb8de61 commit eaa737c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/material/dialog/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ export abstract class _MatDialogBase<C extends _MatDialogContainerBase> implemen
} else {
const injector = this._createInjector<T>(config, dialogRef, dialogContainer);
const contentRef = dialogContainer.attachComponentPortal<T>(
new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector));
new ComponentPortal(componentOrTemplateRef, config.viewContainerRef, injector,
config.componentFactoryResolver));
dialogRef.componentInstance = contentRef.instance;
}

Expand Down

0 comments on commit eaa737c

Please sign in to comment.