• Overview
@angular/core

contentChild

Initializer API

Initializes a content child query. Consider using contentChild.required for queries that should always match.

  
    
  
  
function contentChild<LocatorT>(locator: string | ProviderToken<LocatorT>, opts?: { descendants?: boolean | undefined; read?: undefined; debugName?: string | undefined; } | undefined): Signal<LocatorT | undefined>;

Initializes a content child query.

Consider using contentChild.required for queries that should always match.

@paramlocatorstring | ProviderToken<LocatorT>
@paramopts{ descendants?: boolean | undefined; read?: undefined; debugName?: string | undefined; } | undefined
@returnsSignal<LocatorT | undefined>
function contentChild<LocatorT, ReadT>(locator: string | ProviderToken<LocatorT>, opts: { descendants?: boolean | undefined; read: ProviderToken<ReadT>; debugName?: string | undefined; }): Signal<ReadT | undefined>;
@paramlocatorstring | ProviderToken<LocatorT>
@paramopts{ descendants?: boolean | undefined; read: ProviderToken<ReadT>; debugName?: string | undefined; }
@returnsSignal<ReadT | undefined>
function contentChild.required<LocatorT>(locator: string | ProviderToken<LocatorT>, opts?: { descendants?: boolean | undefined; read?: undefined; debugName?: string | undefined; } | undefined): Signal<LocatorT>;
@paramlocatorstring | ProviderToken<LocatorT>
@paramopts{ descendants?: boolean | undefined; read?: undefined; debugName?: string | undefined; } | undefined
@returnsSignal<LocatorT>
function contentChild.required<LocatorT, ReadT>(locator: string | ProviderToken<LocatorT>, opts: { descendants?: boolean | undefined; read: ProviderToken<ReadT>; debugName?: string | undefined; }): Signal<ReadT>;
@paramlocatorstring | ProviderToken<LocatorT>
@paramopts{ descendants?: boolean | undefined; read: ProviderToken<ReadT>; debugName?: string | undefined; }
@returnsSignal<ReadT>
Jump to details