當我創建一個新的頁面組件時,我現在必須將它放在聲明中以及entryComponents數組中。爲什麼它必須在兩個地方?在聲明數組中放置組件以及entryComponents數組
如我剛剛創建了一個新的login.page.ts文件,但我要聲明這兩個聲明和entryComponents陣列(順便說一句,它不是一個entryComponent這麼說)
app.module.ts
@NgModule({
declarations: [
MyApp,
LoginPage
],
imports: [
IonicModule.forRoot(MyApp),
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
LoginPage
],
providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}]
})
export class AppModule {}
很難說什麼時候沒有代碼代碼用於聲明輸入組件以及它使用的位置。 – silentsod