Its time to start adding functionality
Step 1
Lets Update the application to Lazy Load HomePage
Create a file src/app/pages/home/home.module.ts
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import {HomePage} from './home';
@NgModule({
declarations:[
HomePage,
],
imports:[
IonicPageModule.forChild(HomePage),
]
}) export class HomePageModule {}
Step 2
Replace the code in src/app/app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { FormsModule} from '@angular/forms';
import { MyApp } from './app.component';
import { PostServiceProvider } from '../providers/post-service/post-service';
import { HttpClientModule, HttpClient } from '@angular/common/http';
import { UserServiceProvider } from '../providers/user-service/user-service';
import { ChatsServiceProvider } from '../providers/chats-service/chats-service';
@NgModule({
declarations: [
MyApp,
],
imports: [
BrowserModule,
HttpClientModule,
FormsModule,
IonicModule.forRoot(MyApp)
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
PostServiceProvider,
UserServiceProvider,
ChatsServiceProvider,
UserServiceProvider
]
})
export class AppModule {}