Fix for Error : mat-form-field must contain a MatFormFieldControl
I had this issue. I imported MatFormFieldModule at my material module, but forgot to add MatInputModule to the imports array:
1 | import { MatFormFieldModule, MatInputModule } from '@angular/material'; |
Tip: Always keep a separate module that contains all the material things you use.