Skip to content

Commit 1fbeada

Browse files
committed
chore(ivy): add static flag to dialog-related static queries
1 parent dc7467e commit 1fbeada

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cdk-experimental/dialog/dialog-container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class CdkDialogContainer extends BasePortalOutlet implements OnDestroy {
9797
// tslint:disable:no-host-decorator-in-concrete
9898

9999
/** The portal host inside of this container into which the dialog content will be loaded. */
100-
@ViewChild(PortalHostDirective) _portalHost: PortalHostDirective;
100+
@ViewChild(PortalHostDirective, {static: true}) _portalHost: PortalHostDirective;
101101

102102
/** A subject emitting before the dialog enters the view. */
103103
_beforeEnter: Subject<void> = new Subject();

src/lib/dialog/dialog-container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export function throwMatDialogContentAlreadyAttachedError() {
7272
})
7373
export class MatDialogContainer extends BasePortalOutlet {
7474
/** The portal outlet inside of this container into which the dialog content will be loaded. */
75-
@ViewChild(CdkPortalOutlet) _portalOutlet: CdkPortalOutlet;
75+
@ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;
7676

7777
/** The class that traps and manages focus within the dialog. */
7878
private _focusTrap: FocusTrap;

0 commit comments

Comments
 (0)