ReadonlyacceptOptionalautofilledOptionalcontrolAn optional name for the control type that can be used to distinguish mat-form-field elements
based on their control type. The form field will add a class,
mat-form-field-type-{{controlType}} to its root element.
Whether the control is disabled.
Whether the control is in an error state.
Whether the control is focused.
ReadonlyngGets the AbstractControlDirective for this control.
Whether the control is required.
Whether the MatFormField label should try to float.
ReadonlysnackStream that emits whenever the state of the control changes such that the parent MatFormField
needs to run change detection.
OptionaluserValue of aria-describedby that should be merged with the described-by ids
which are set by the form-field.
The value of the control.
StaticnextWhether the control is empty.
The element ID for this control.
The placeholder for this control.
The placeholder for this control.
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
Handles a click on the control's container.
The callback function to register
Registers a callback function that is called when the control's value changes in the UI.
This method is called by the forms API on initialization to update the form model when values propagate from the view to the model.
When implementing the registerOnChange method in your own value accessor,
save the given function so your class calls it at the appropriate time.
The following example stores the provided function as an internal method.
registerOnChange(fn: (_: any) => void): void {
this._onChange = fn;
}
When the value changes in the UI, call the registered function to allow the forms API to update itself:
host: {
'(change)': '_onChange($event.target.value)'
}
The callback function to register
Registers a callback function that is called by the forms API on initialization to update the form model on blur.
When implementing registerOnTouched in your own value accessor, save the given
function so your class calls it when the control should be considered
blurred or "touched".
The following example stores the provided function as an internal method.
registerOnTouched(fn: any): void {
this._onTouched = fn;
}
On blur (or equivalent), your class should call the registered function to allow the forms API to update itself:
host: {
'(blur)': '_onTouched()'
}
Sets the list of element IDs that currently describe this control.
Whether the input is currently in an autofilled state. If property is not present on the control it is assumed to be false.