adev/src/content/reference/errors/NG0951.md
Required child query (contentChild.required or viewChild.required) result was accessed before query results were calculated or query has no matches.
This can happen in two distinct situations:
Content queries and view queries each calculate their results at different points in time:
contentChild results are available after a host view (template where a directive declaring a query is used) is created;viewChild results are available after a template of a component declaring a query is created.Accessing query results before they're available results in the error described on this page. Most notably, query results are never available in a constructor of the component or directive declaring a query.
contentChild query results can be accessed in the AfterContentChecked lifecycle hook, or later.
viewChild query results can be accessed in the AfterViewChecked lifecycle hook, or later.
Make sure that a required query matches at least one node and has results at all. You can verify this by accessing query results in the lifecycle hooks listed above.