HTML CODE
`<mat-form-field>
<input type="file" (change)="onFileSelected($event)" name="categoryImage" >
</mat-form-field>`
TS code
onFileSelected(event){
console.log(event);}
getting error even before operation mat-form-field must contain a MatFormFieldControl. at this line getMatFormFieldMissingControlError
<input matInput
. Next time read the documentation carefully : material.angular.io/components/input/overview - user4676340mat-form-field
. - user4676340