From 251bec159af1e8f90c3af9820695c645800207e4 Mon Sep 17 00:00:00 2001 From: Ajit Singh Date: Sat, 7 Mar 2020 13:36:30 +0530 Subject: [PATCH] docs: documentation of descendants property of @ContentChildren (#35927) documentation of decendants property of @ContentChildren was not clear when decendants was set to false it did not pick up direct children when any directive was used on the elements. With Ivy the functionality follows the following pattern only query direct children (in the sense of elements in a template) when descendants: false is specified. Fixes #20074 PR Close #35927 --- packages/core/src/metadata/di.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/metadata/di.ts b/packages/core/src/metadata/di.ts index 1a793bbde4..53e317bf41 100644 --- a/packages/core/src/metadata/di.ts +++ b/packages/core/src/metadata/di.ts @@ -145,7 +145,8 @@ export interface ContentChildrenDecorator { * **Metadata Properties**: * * * **selector** - The directive type or the name used for querying. - * * **descendants** - True to include all descendants, otherwise include only direct children. + * * **descendants** - If `true` include all descendants of the element. If `false` then only + * query direct children of the element. * * **emitDistinctChangesOnly** - The ` QueryList#changes` observable will emit new values only * if the QueryList result has changed. When `false` the `changes` observable might emit even * if the QueryList has not changed.