I am exporting a custom component in my AppModule but can not use it in another module, which is being imported in the AppModule. I thought exported components are visible globally?
I am trying to use the CalendarComponent with the selector 'app-calendar' in a component within the TestModule.
app.module.ts
@NgModule({
declarations: [ ... ,
CalendarComponent,
],
imports: [ ... ,
TestModule,
],
exports: [ ...
CalendarComponent,
],
providers: [ ... ],
bootstrap: [AppComponent]
})
test.module.ts
@NgModule({
declarations: [ ... ,
TestComponent
],
imports: [ ... ],
exports: [ ... ],
providers: [ ... ]
})
test.component.html
<app-calendar></app-calendar>
Console throws the error that 'app-calendar' is not a known element (not part of the module)
What am I missing?