ฉันกำลังทำงานในIonicแอป ( 2.0.0-rc0) angular 2ซึ่งขึ้นอยู่กับ ดังนั้นการแนะนำใหม่ngModulesจึงรวมอยู่ด้วย ฉันกำลังเพิ่มapp.module.ts.ด้านล่างของฉัน
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { MyApp } from './app.component';
import { Users } from '../pages/users/users';
@NgModule({
declarations: [
MyApp,
Users
],
imports: [
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
Users
]
})
export class AppModule {}
มาentryComponentsทำอะไรที่นี่? Componentsถูกกำหนดไว้แล้วในdeclarations. แล้วอะไรคือความจำเป็นในการทำซ้ำ? จะเกิดอะไรขึ้นถ้าฉันไม่รวมส่วนประกอบไว้ที่นี่?
declaredในngModuleแต่ไม่เคยใช้ angular.io/docs/ts/latest/cookbook/… entrycomponents -