diff --git a/packages/core/src/metadata/di.ts b/packages/core/src/metadata/di.ts index c568bbdf18..944a49fbf4 100644 --- a/packages/core/src/metadata/di.ts +++ b/packages/core/src/metadata/di.ts @@ -321,8 +321,21 @@ export interface ViewChildDecorator { * * **selector** - the directive type or the name used for querying. * * **read** - read a different token from the queried elements. * + * Supported selectors include: + * * any class with the `@Component` or `@Directive` decorator + * * a template reference variable as a string (e.g. query ` + * with `@ViewChild('cmp')`) + * * any provider defined in the child component tree of the current component (e.g. + * `@ViewChild(SomeService) someService: SomeService`) + * * any provider defined through a string token (e.g. `@ViewChild('someToken') someTokenVal: + * any`) + * * a `TemplateRef` (e.g. query `` with `@ViewChild(TemplateRef) + * template;`) + * * @usageNotes * + * {@example core/di/ts/viewChild/view_child_example.ts region='Component'} + * * ### Example * * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'}