我正在开发一个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
. 那么重复它们有什么必要呢?如果我在这里不包含组件会发生什么?