ModelFunction
model
declares a writeable signal that is exposed as an input/output pair on the containing
directive. The input name is taken either from the class member or from the alias
option.
The output name is generated by taking the input name and appending Change
.
interface ModelFunction {
required: {...}
<T>(): ModelSignal<T | undefined>
<T>(initialValue: T, opts?: ModelOptions): ModelSignal<T>
}
Description
The function exposes an API for also declaring required models via the
model.required
function.
Properties
Property | Description |
---|---|
required: {
<T>(opts?: ModelOptions): ModelSignal<T>;
}
|
Methods
call signature | ||||||
---|---|---|---|---|---|---|
Initializes a model of type |
||||||
ParametersThere are no parameters. Returns
|
||||||
Initializes a model of type
Parameters
Returns |