test: clean up explicit dynamic query usages (#33015)
Cleans up all the places where we explicitly set `static: false` on queries. PR Close #33015
This commit is contained in:
@ -21,7 +21,7 @@ export class Pane {
|
||||
`
|
||||
})
|
||||
export class Tab {
|
||||
@ContentChild(Pane, {static: false}) pane !: Pane;
|
||||
@ContentChild(Pane) pane !: Pane;
|
||||
}
|
||||
|
||||
@Component({
|
||||
|
@ -15,7 +15,7 @@ class ChildDirective {
|
||||
|
||||
@Directive({selector: 'someDir'})
|
||||
class SomeDir implements AfterContentInit {
|
||||
@ContentChild(ChildDirective, {static: false}) contentChild !: ChildDirective;
|
||||
@ContentChild(ChildDirective) contentChild !: ChildDirective;
|
||||
|
||||
ngAfterContentInit() {
|
||||
// contentChild is set
|
||||
|
@ -26,7 +26,7 @@ export class Pane {
|
||||
`,
|
||||
})
|
||||
export class ViewChildComp {
|
||||
@ViewChild(Pane, {static: false})
|
||||
@ViewChild(Pane)
|
||||
set pane(v: Pane) {
|
||||
setTimeout(() => { this.selectedPane = v.id; }, 0);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ class ChildDirective {
|
||||
|
||||
@Component({selector: 'someCmp', templateUrl: 'someCmp.html'})
|
||||
class SomeCmp implements AfterViewInit {
|
||||
@ViewChild(ChildDirective, {static: false}) child !: ChildDirective;
|
||||
@ViewChild(ChildDirective) child !: ChildDirective;
|
||||
|
||||
ngAfterViewInit() {
|
||||
// child is set
|
||||
|
Reference in New Issue
Block a user