I have an app module and a feature module. A component called "AudioPlayerComponent" is declared in the feature module. I want to use it in the app module, but its not showing. No errors.
Am I missing something?
App Module:
@NgModule({
imports: [
BrowserModule,
HomeModule,
ReciterModule, // the feature module which has the audio player
routing
],
declarations: [
AppComponent,
NavComponent
],
providers: [
appRoutingProviders,
AudioPlayerService
],
bootstrap: [AppComponent]
})
Feature Module:
@NgModule({
imports: [
CommonModule,
FormsModule,
HttpModule,
reciterRouting
],
declarations: [
ReciterDetailComponent,
WidgetComponent,
AudioPlayerComponent // this is the component I want to also use in the app component
],
providers: [
AppService,
RecitersService
]
})
A component in the feature module that uses audio-player (Shows)
<div class="reciter-detail">
...
<audio-player></audio-player>
</div>
App component that tries to use audio-player (doesn't show):
<nav-main></nav-main>
<div class="container">
<router-outlet></router-outlet>
<audio-player></audio-player>
</div>