ViewChildFunction
Type of the viewChild
function. The viewChild function creates a singular view query.
interface ViewChildFunction {
required: {...}
<LocatorT>(locator: string | ProviderToken<LocatorT>): Signal<LocatorT | undefined>
<LocatorT, ReadT>(locator: string | ProviderToken<LocatorT>, opts: { read: ProviderToken<ReadT>; }): Signal<ReadT | undefined>
}
Description
It is a special function that also provides access to required query results via the .required
property.
Properties
Property | Description |
---|---|
required: {
<LocatorT>(locator: ProviderToken<LocatorT> | string): Signal<LocatorT>;
<LocatorT, ReadT>(locator: ProviderToken<LocatorT> | string, opts: {
read: ProviderToken<ReadT>;
}): Signal<ReadT>;
}
|
Initializes a view child query that is expected to always match an element. |
Methods
call signature | ||||||
---|---|---|---|---|---|---|
Initializes a view child query. Consider using |
||||||
Parameters
Returns
|
||||||
Parameters
Returns
|