I am working on an Ionic
app ( 2.0.0-rc0
) which depends on angular 2
. So the new introduction of ngModules
is included. I am adding my app.module.ts.
below.
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 {}
What does entryComponents
do here? Components
are already defined in declarations
. So what's the need of repeating them ? What would happen if I dont include a component here?
declared
inngModule
but are never used. angular.io/docs/ts/latest/cookbook/…entrycomponents- – Snooty