We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc1bf54 commit eb12317Copy full SHA for eb12317
src/lib/dialog/dialog.ts
@@ -281,6 +281,10 @@ export class MatDialog {
281
const injectionTokens = new WeakMap();
282
283
injectionTokens.set(MatDialogRef, dialogRef);
284
+ // The MatDialogContainer is injected in the portal as the MatDialogContainer and the dialog's
285
+ // content are created out of the same ViewContainerRef and as such, are siblings for injector
286
+ // purposes. To allow the hierarchy that is expected, the MatDialogContainer is explicitly
287
+ // added to the injection tokens.
288
injectionTokens.set(MatDialogContainer, dialogContainer);
289
injectionTokens.set(MAT_DIALOG_DATA, config.data);
290
injectionTokens.set(Directionality, {
0 commit comments