Skip to content

Commit

Permalink
chore(ivy): add static flag to dialog-related static queries (#15239)
Browse files Browse the repository at this point in the history
  • Loading branch information
kara authored and josephperrott committed Mar 7, 2019
1 parent ba8d14b commit 971ab53
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cdk-experimental/dialog/dialog-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class CdkDialogContainer extends BasePortalOutlet implements OnDestroy {
// tslint:disable:no-host-decorator-in-concrete

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

/** A subject emitting before the dialog enters the view. */
_beforeEnter: Subject<void> = new Subject();
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dialog/dialog-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function throwMatDialogContentAlreadyAttachedError() {
})
export class MatDialogContainer extends BasePortalOutlet {
/** The portal outlet inside of this container into which the dialog content will be loaded. */
@ViewChild(CdkPortalOutlet) _portalOutlet: CdkPortalOutlet;
@ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;

/** The class that traps and manages focus within the dialog. */
private _focusTrap: FocusTrap;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/snack-bar/snack-bar-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class MatSnackBarContainer extends BasePortalOutlet implements OnDestroy
private _destroyed = false;

/** The portal outlet inside of this container into which the snack bar content will be loaded. */
@ViewChild(CdkPortalOutlet) _portalOutlet: CdkPortalOutlet;
@ViewChild(CdkPortalOutlet, {static: true}) _portalOutlet: CdkPortalOutlet;

/** Subject for notifying that the snack bar has exited from view. */
readonly _onExit: Subject<any> = new Subject();
Expand Down

0 comments on commit 971ab53

Please sign in to comment.