import {MatInputModule} from '@angular/material/input';
MatInput
Directive that allows a native input to work inside a MatFormField
.
Selector: input[matInput] textarea[matInput] select[matNativeControl] input[matNativeControl] textarea[matNativeControl]
Exported as: matInputName | Description |
---|---|
@Input()
|
An object used to control when error messages are shown. |
@Input()
|
Whether the element is readonly. |
@Input()
|
Input type of the element. |
|
Whether the component is in an error state. |
focus | |
---|---|
Focuses the input. |
|
Parameters | |
options? FocusOptions
|
|
updateErrorState | |
---|---|
Updates the error state based on the provided error state matcher. |
MAT_INPUT_VALUE_ACCESSOR
This token is used to inject the object whose value should be set into MatInput
. If none is
provided, the native HTMLInputElement
is used. Directives like MatDatepickerInput
can provide
themselves for this token, in order to make MatInput
delegate the getting and setting of the
value to them.
const MAT_INPUT_VALUE_ACCESSOR: InjectionToken<{ value: any; }>;