You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar but opposite to how the ContentChildren decorator has descendants option to query all descendants, I would like ContentChild to have an option to query only direct descendants.
Describe the solution you'd like
Add descendants as a metadata property for ContentChild
If descendants is true or undefined, query all descendants (preserves current behavior)
If descendants is false, query only direct descendants
The expected behavior, for example, would be that a component (my-component) which may or may not expect a content child directive (my-directive) will not catch said content child directive from the nested component.
I can make a working example if this pseudo-example doesn't explain very well
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
Is this not considered? If someone has optional templates with nested components the parent can pick children templates and consider them like its own, which is wrong
Activity
the-avid-engineer commentedon Jul 30, 2019
The expected behavior, for example, would be that a component (
my-component) which may or may not expect a content child directive (my-directive) will not catch said content child directive from the nested component.I can make a working example if this pseudo-example doesn't explain very well
VS
pkozlowski-opensource commentedon Sep 17, 2019
Yep, we should definitively add the
descendantsoption forContentChild, was bitten by the lack of it several times already![-]ContentChild - Direct Descendants Only[/-][+]Add the descendants option to ContentChild[/+]angular-robot commentedon Jun 4, 2021
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.
Find more details about Angular's feature request process in our documentation.
angular-robot commentedon Jun 24, 2021
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
the-avid-engineer commentedon Jun 24, 2021
It would be nice if the bot posted a link to the poll itself. I had no idea where to vote.
1 remaining item
the-avid-engineer commentedon Jun 24, 2021
I don't see any links in the documentation.
the-avid-engineer commentedon Jun 24, 2021
Is the voting just done on this issue?
Airblader commentedon Jun 24, 2021
Yes, it's done using reactions on the issue.
angular-robot commentedon Jul 24, 2021
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.
We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.
You can find more details about the feature request process in our documentation.
Xriuk commentedon May 26, 2022
Is this not considered? If someone has optional templates with nested components the parent can pick children templates and consider them like its own, which is wrong
angular-automatic-lock-bot commentedon Aug 1, 2022
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.