Getting Started Clarification

It seems the project structure section of the getting started was updated recently and there are a few things I don’t understand there.

  declarations: [MyApp,HelloIonicPage, ItemDetailsPage, ListPage],
  imports: [IonicModule.forRoot(MyApp)],
  bootstrap: [IonicApp],
  entryComponents: [MyApp,HelloIonicPage,ItemDetailsPage,ListPage],
  providers: []
export class AppModule {}

I can’t find entryComponents in the angular2 documentation, is that an ionic thing? And what does it do? This leads into my next question. The next page in the ionic tutorial is Adding Pages but I think it’s the old one. What is the proper way to add a page in the RC? Can I just add a declaration for the new page in my ngModule and then just nav there? Thanks.

Yes entryComponents is an ionic thing (AFAIK).

You need to add every Component and Pipe to the declarations section. And then add every component that is a: Page, Modal, Popover in the entryComponents array too.

Once you have your page, modal, or popover declared in entryComponents and declarations, you can go ahead and display it to the user in any way you want.

1 Like