• Overview
@angular/core

viewChildren

Initializer API

Initializes a view children query.

Query results are represented as a signal of a read-only collection containing all matched elements.

  
    
  
  
function viewChildren<LocatorT>(locator: string | ProviderToken<LocatorT>, opts?: { debugName?: string | undefined; } | undefined): Signal<readonly LocatorT[]>;
@paramlocatorstring | ProviderToken<LocatorT>
@paramopts{ debugName?: string | undefined; } | undefined
@returnsSignal<readonly LocatorT[]>
function viewChildren<LocatorT, ReadT>(locator: string | ProviderToken<LocatorT>, opts: { read: ProviderToken<ReadT>; debugName?: string | undefined; }): Signal<readonly ReadT[]>;
@paramlocatorstring | ProviderToken<LocatorT>
@paramopts{ read: ProviderToken<ReadT>; debugName?: string | undefined; }
@returnsSignal<readonly ReadT[]>
Jump to details