Answers for "mat-form-field must contain a matformfieldcontrol. at getmatformfieldmissingcontrolerror (form-field.mjs:112)"

5

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

Code answers related to "TypeScript"

Browse Popular Code Answers by Language