Solution: mat-form-field must contain a MatFormFieldControl error in Angular

Angular mat-form-field must contain a MatFormFieldControl

If you are using Angular material in your project and if you have any forms in the application then you must be using Angular Material Form Field Component from MatFormFieldModule And of the common error that we usually get is while working with Angular Material Form Field is: mat-form-field must contain a MatFormFieldControl.

Angular Material Button Example

Angular Material Button

Angular Material button module MatButtonModule(mat-button,mat-raised-button,mat-icon-button,mat-fab,mat-mini-fab) enhances the user experience of normal buttons tags by following Material design principles.