1

I'm developping a simple angular application and getting when normally importing material form fields:

src/app/auth/login/login.component.html:8:5 - error NG8001: 'mat-label' is not a known element:
1. If 'mat-label' is an Angular component, then verify that it is part of this module.
2. If 'mat-label' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

     <mat-label>Password</mat-label>

and my module:

@NgModule({
  declarations: [RegisterComponent, LoginComponent],
  imports: [
    CommonModule,
    BrowserModule,
    BrowserAnimationsModule,
    ReactiveFormsModule,
    HttpClientModule,
    FormsModule,
    MatFormFieldModule,
    MatInputModule,
    MatButtonModule,
    MatTabsModule,
  ],
  providers: [],
  exports: [],
  schemas: [CUSTOM_ELEMENTS_SCHEMA],
})

I'm using angular 9.1.9, any thoughts? Cheers

dazzed
  • 643
  • 2
  • 9
  • 19

1 Answers1

0

Found it, it was missing the import of this module into the app.module.

dazzed
  • 643
  • 2
  • 9
  • 19