ViewChildren is Angular’s signal-based query function for obtaining references to multiple HTML elements or components declared in a component view. It modernizes the decorator-based @ViewChildren approach by returning a signal containing an array of matching references. section 7.5.3 section 10.3.4
The signal updates when matching elements are added to or removed from the query result. Computed signals can derive values from the references, while effects can react to changes without manually synchronizing a secondary property. section 10.3.4 section 10.3.4
ViewChildren fits Angular’s broader signal-based query direction:
- Use viewChildren for multiple elements or components in the view; use viewChild for a single reference. section 7.5.3
- Use contentChildren instead when the queried elements belong to projected content. section 7.5.3
- Avoid the older setter-and-secondary-property pattern previously needed to observe QueryList changes. section 10.3.4
