Answers for "mat-form-field must contain a MatFormFieldControl"

4

mat-form-field must contain a MatFormFieldControl

@NgModule({
    imports: [
        MatInputModule
    ],
    exports: [
        MatInputModule
    ]
})
Posted by: Guest on November-10-2020
0

mat-form-field must contain a MatFormFieldControl

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>
Posted by: Guest on March-06-2021
0

mat-form-field must contain a matformfieldcontrol checkbox

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>
Posted by: Guest on April-22-2021

Code answers related to "mat-form-field must contain a MatFormFieldControl"

Browse Popular Code Answers by Language