Hi, i am getting the above error " mat-form-field must contain a MatFormFieldControl" when i try to use angular material mat-formfield, after a couple of google, i have found that we have to import mat-input, i have imported but still facing the error, can anyone help to resolve will be appreciable.
Mat-form-field must contain a MatFormFieldControl
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Dhanush KRank #1,037 · 1.9K reputationPosted Apr 28, 2022, 1:31 PM EDT
Make sure you add the following code:
import { MatFormFieldModule, MatInputModule } from '@angular/material';
@NgModule({
imports: [
MatFormFieldModule,
MatInputModule
]
})
export class AppModule { }
Reference: https://stackoverflow.com/a/46795510/16487734