The following are the instructions for lazy loading:
- Create a new app LazyLoading using the blank template and navigate to the Lazy Loading folder, as follows:
$ ionic start LazyLoading blank$ cd LazyLoading
- Create a new file named home.module.ts inside the /src/pages/home folder, and add the following content to it:
import { NgModule } from "@angular/core";import { IonicPageModule } from "ionic-angular";import { HomePage } from "./home";@NgModule({ declarations: [HomePage], imports: [IonicPageModule.forChild(HomePage)]})export class HomePageModule {}
- Add the IonicPage decorator to the HomePage's Component, as follows:
import { Component } from "@angular/core";import { NavController, IonicPage } from "ionic-angular"; ...