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 {}

  

Step 3

open the code in src/pages/home.ts
Add the following lines above the @Component decorator

import { IonicPage } from 'ionic-angular';

@IonicPage()
      

Step 4

Replace the code in src/app/app.component.ts

//Replace public rootPage: any;
public rootPage: string;

// Replace this.rootPage = HomePage;
this.rootPage = "HomePage";
  

Step 5

Replace the code in src/pages/home/home.ts

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import {PostServiceProvider} from '../../providers/post-service/post-service';
import { IonicPage } from 'ionic-angular';

@IonicPage()
@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  public posts: any;

  constructor(public nav: NavController, public postService: PostServiceProvider) {
    this.posts = postService.getAll();
  }

  toggleLike(post) {
    // if user liked
    if(post.liked) {
      post.likeCount--;
    } else {
      post.likeCount++;
    }

    post.liked = !post.liked
  }

  // on click, go to post detail
  viewPost(postId) {
    //this.nav.push("PostPage", {id: postId})
  }

  // on click, go to user timeline
  viewUser(userId) {
    //this.nav.push(UserPage, {id: userId})
  }
}