As of 8.0.0 Angular adds a required property to all @ViewCihld @ContentChild calls. Till 9.0.0 it could either be false (default and expected) and true. This is an intermediate solution and all calls should be false till 9.0.0. Related functionality should be fixed to address this logic. Details https://next.angular.io/guide/static-query-migration.
In tests we should prefer debugElement over @ViewChild.
@nnixaa more specifically if the element needs to be available during ngOnInit, then static needs to be true, but if it can wait until after the init it can be false, which means it won't be available until ngAfterViewInit.
Most helpful comment
@nnixaa more specifically if the element needs to be available during
ngOnInit, then static needs to be true, but if it can wait until after the init it can be false, which means it won't be available untilngAfterViewInit.