Skip to content

Commit edf819e

Browse files
authored
test(overlay): use static queries w/ overlay containers (#15301)
1 parent 669d586 commit edf819e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cdk/overlay/fullscreen-overlay-container.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ describe('FullscreenOverlayContainer', () => {
111111
providers: [Overlay],
112112
})
113113
class TestComponentWithTemplatePortals {
114-
@ViewChild(CdkPortal) templatePortal: CdkPortal;
114+
@ViewChild(CdkPortal, {static: true}) templatePortal: CdkPortal;
115115

116116
constructor(public viewContainerRef: ViewContainerRef) { }
117117
}

src/cdk/overlay/overlay-container.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe('OverlayContainer', () => {
6060
providers: [Overlay],
6161
})
6262
class TestComponentWithTemplatePortals {
63-
@ViewChild(CdkPortal) templatePortal: CdkPortal;
63+
@ViewChild(CdkPortal, {static: true}) templatePortal: CdkPortal;
6464

6565
constructor(public viewContainerRef: ViewContainerRef) { }
6666
}

0 commit comments

Comments
 (0)