Mat-Form-Field должен содержать MatformfieldControl
@NgModule({
imports: [
MatInputModule
],
exports: [
MatInputModule
]
})
GutoTrosla
@NgModule({
imports: [
MatInputModule
],
exports: [
MatInputModule
]
})
Maybe you need to close <input> tag:
<!-- Wrong -->
<mat-form-field>
<input matInput>
</mat-form-field>
<!-- Right -->
<mat-form-field>
<input matInput />
</mat-form-field>
The following Angular Material components are designed to work inside a <mat-form-field>:
<input matNativeControl> & <textarea matNativeControl> (version 7 & newer)
<select matNativeControl> (version 7 & newer)
<input matInput> & <textarea matInput> (version 5 & 6)
<mat-select>
<mat-chip-list>