import {MatFormFieldModule} from '@angular/material/form-field';
MatError
Single error message to be shown underneath the form field.
Selector: mat-error
Name | Description |
---|---|
@Input()
|
MatFormField
Container for form controls that applies Material Design styling and behavior.
Selector: mat-input-container mat-form-field
Exported as: matFormFieldName | Description |
---|---|
@Input()
| Theme color palette for the component. |
@Input()
| Whether the label should always float, never float or float as the user types. |
@Input()
| Whether the required marker should be hidden. |
@Input()
| Text for the form field hint. |
| Reference to the form field's underline element. |
@Input() Deprecated
| |
@Input() Deprecated
| Whether the placeholder should always float, never float or float as the user types. |
MatHint
Hint text to be shown underneath the form field control.
Selector: mat-hint
Name | Description |
---|---|
@Input()
| Whether to align the hint label at the start or end of the line. |
@Input()
| Unique ID for the hint. Used for the aria-describedby on the form field control. |
MatPlaceholder
The placeholder text for an MatFormField
.
Selector: mat-placeholder
MatPrefix
Prefix to be placed the the front of the form field.
Selector: [matPrefix]
MatSuffix
Suffix to be placed at the end of the form field.
Selector: [matSuffix]
MatLabel
The floating label for a mat-form-field
.
Selector: mat-label
MatFormFieldControl
An interface which allows a control to work inside of a MatFormField
.
Name | Description |
---|---|
| An optional name for the control type that can be used to distinguish |
| Whether the control is disabled. |
| Whether the control is empty. |
| Whether the control is in an error state. |
| Whether the control is focused. |
| The element ID for this control. |
| Gets the NgControl for this control. |
| The placeholder for this control. |
| Whether the control is required. |
| Whether the |
| Stream that emits whenever the state of the control changes such that the parent |
| The value of the control. |
Deprecated
| Whether the |
onContainerClick | |
---|---|
Handles a click on the control's container. | |
Parameters | |
event MouseEvent |
setDescribedByIds | |
---|---|
Sets the list of element IDs that currently describe this control. | |
Parameters | |
ids string[] |