I have an nrwl nx angular project right now I have two libraries one material home and one ui elements. Inside Ui elements I have datatable component which I want to use in my material home. I used the selector and imported the module of UI Elements to material module. In Ui Elements module I have my datatable component inside the export and declaration part. But Angular gives me still this error:
Error: libs/material/src/lib/material-home/material-home.component.html:1:1 - error NG8001: 'moniesta-data-table' is not a known element:
1. If 'moniesta-data-table' is an Angular component, then verify that it is part of this module.
2. If 'moniesta-data-table' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
This is how my html looks:
<moniesta-data-table></moniesta-data-table>
Material Module:
@NgModule({
imports: [CommonModule, MatButtonModule, UiElementsModule],
declarations: [
MaterialHomeComponent,
],
})
export class MaterialModule {}
And finally the UiElementsModule
@NgModule({
imports: [CommonModule, MatButtonModule, MatTableModule],
declarations: [
DataTableComponent
],
exports: [
DataTableComponent
]
})
export class UiElementsModule {}
In my general understanding it should work like this, because I have imported UIElementsModule into MaterialModule. So what could be the error?