Ionic 3.0.0 Beta!

I did update the doc a bit to explain things a bit clearer.

It really goes down to this.

  • If you want a page to be lazy loaded, it needs an IonicPage decorator, and a ngModule that will load things.

For components/pipes we’ve settled on this setup, which we think will be the easiest out of the box

Components
One module that imports all component classes, no individual modules for each component

components/

  • components.module.ts (ComponentsModule)
    • imports and exports all components the user creates
  • component1/
    • component1.ts
    • component1.html
  • component2/
    • component2.ts
    • component2.html

Creating a page using generators automatically imports ComponentsModule

Pipes
One module that imports all pipe classes, no individual modules for each pipe

pipes/

  • pipes.module.ts (PipesModule)
    • imports and exports all pipes the user creates
  • pipe1.ts
  • pipe2.ts

Providers
No NgModule for providers, import each provider in main app NgModule

providers/

  • provider1.ts
  • provider2.ts

Now a lot of this work will be handled by the generators, so it will be automatic for the most part. If a dev wants more fine-tuned control, they still have the option to do that. But having things setup this way will provide the easiest path for most people.

3 Likes