私はアプリモジュールとフィーチャモジュールを持っています。フィーチャモジュールでは、「AudioPlayerComponent」というコンポーネントが宣言されています。私は、アプリケーションモジュールでそれを使用したいが、それは表示されません。エラーはありません。angular2 rc5フィーチャモジュールのコンポーネントを使用していません
何か不足していますか?
アプリケーションモジュール:
@NgModule({
imports: [
BrowserModule,
HomeModule,
ReciterModule, // the feature module which has the audio player
routing
],
declarations: [
AppComponent,
NavComponent
],
providers: [
appRoutingProviders,
AudioPlayerService
],
bootstrap: [AppComponent]
})
機能モジュール:
@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
]
})
オーディオプレーヤーを使用する機能モジュール内のコンポーネント(ショー)
<div class="reciter-detail">
...
<audio-player></audio-player>
</div>
オーディオプレーヤーを使用しようとし
アプリケーションコンポーネント(表示されません):
<nav-main></nav-main>
<div class="container">
<router-outlet></router-outlet>
<audio-player></audio-player>
</div>