I have an Angular 10 project, but I get a strange error using Angular material for some components, like the form-field (instead for components like "table" everything is ok):
'mat-form-field' is not a known element:
- If 'mat-form-field' is an Angular component, then verify that it is part of this module.
- If 'mat-form-field' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message
This is my app module:
...
import { MatFormField, MatLabel } from '@angular/material/form-field';
...
@NgModule({
declarations: [
AppComponent,
],
imports: [
MatFormField
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }