import {MatInputModule} from '@angular/material/input';
MatInput
Selector: input[matInput] textarea[matInput] select[matNativeControl] input[matNativeControl] textarea[matNativeControl]
Exported as: matInputName | Description |
---|---|
@Input({ transform: booleanAttribute })
|
Whether the input should remain interactive when it is disabled. |
@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 input is in an error state. |
|
focus | |
---|---|
Focuses the input. |
|
Parameters | |
options? FocusOptions
|
|
updateErrorState | |
---|---|
Refreshes the error state of the input. |
MatInputConfig
Object that can be used to configure the default options for the input.
Name | Description |
---|---|
|
Whether disabled inputs should be interactive. |
MAT_INPUT_CONFIG
Injection token that can be used to provide the default options for the input.
const MAT_INPUT_CONFIG: InjectionToken;
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; }>;