Answer the question
In order to leave comments, you need to log in
Why does not find the material module for the component?
My SharedModule is imported into app.module:
@NgModule({
imports: [CommonModule, MaterialModule],
declarations: [
FormsModule,
MaterialModule,
HeaderOrderBlockClassifierComponent,
OrderDefinitionsTabsComponent,
],
exports: [
HeaderOrderBlockClassifierComponent,
OrderDefinitionsTabsComponent,
FormsModule,
MaterialModule,
CommonModule,
],
})
export class SharedModule {}
HeaderOrderBlockClassifierComponent.
header-order-block-classifier/header-order-block-classifier.component.html:4:5 - error NG8001: 'mat-icon' is not a known element:
1. If 'mat-icon' is an Angular component, then verify that it is part of this module.
2. If 'mat-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
HeaderOrderBlockClassifierComponent
inMaterialModule
export class SharedModule {}
Answer the question
In order to leave comments, you need to log in
import {MatIconModule} from '@angular/material/icon';
probably for this reason
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question