diff --git a/packages/core/src/metadata/di.ts b/packages/core/src/metadata/di.ts index 7e3d5c694f..6eb066fd0d 100644 --- a/packages/core/src/metadata/di.ts +++ b/packages/core/src/metadata/di.ts @@ -154,6 +154,13 @@ export interface ContentChildrenDecorator { * removed in future versions of Angular. * * **read** - Used to read a different token from the queried elements. * + * The following values are supported by `read`: + * * Any class with the `@Component` or `@Directive` decorator + * * Any provider defined on the injector of the component that is matched by the `selector` of + * this query + * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`) + * * `TemplateRef`, `ElementRef`, and `ViewContainerRef` + * * @usageNotes * * Here is a simple demonstration of how the `ContentChildren` decorator can be used. @@ -230,6 +237,13 @@ export interface ContentChildDecorator { * * **static** - True to resolve query results before change detection runs, * false to resolve after change detection. Defaults to false. * + * The following values are supported by `read`: + * * Any class with the `@Component` or `@Directive` decorator + * * Any provider defined on the injector of the component that is matched by the `selector` of + * this query + * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`) + * * `TemplateRef`, `ElementRef`, and `ViewContainerRef` + * * @usageNotes * * {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'} @@ -293,6 +307,13 @@ export interface ViewChildrenDecorator { * ** Note: *** This config option is **deprecated**, it will be permanently set to `true` and * removed in future versions of Angular. * + * The following values are supported by `read`: + * * Any class with the `@Component` or `@Directive` decorator + * * Any provider defined on the injector of the component that is matched by the `selector` of + * this query + * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`) + * * `TemplateRef`, `ElementRef`, and `ViewContainerRef` + * * @usageNotes * * {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'} @@ -368,6 +389,13 @@ export interface ViewChildDecorator { * * A `TemplateRef` (e.g. query `` with `@ViewChild(TemplateRef) * template;`) * + * The following values are supported by `read`: + * * Any class with the `@Component` or `@Directive` decorator + * * Any provider defined on the injector of the component that is matched by the `selector` of + * this query + * * Any provider defined through a string token (e.g. `{provide: 'token', useValue: 'val'}`) + * * `TemplateRef`, `ElementRef`, and `ViewContainerRef` + * * @usageNotes * * {@example core/di/ts/viewChild/view_child_example.ts region='Component'}