Last active
December 18, 2017 20:42
-
-
Save rajesh-h/7a1f54e3d5328b0bc7bbe55e41950374 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { IonicPage, NavController, NavParams } from 'ionic-angular'; | |
import { wpApiPosts } from 'wp-api-angular'; | |
/** | |
* Generated class for the CustomHomePage page. | |
* | |
* See https://ionicframework.com/docs/components/#navigation for more info on | |
* Ionic pages and navigation. | |
*/ | |
@IonicPage() | |
@Component({ | |
selector: 'page-custom-home', | |
templateUrl: 'custom-home.html', | |
}) | |
export class CustomHomePage { | |
title: string; | |
posts: any; | |
constructor(public navCtrl: NavController, public navParams: NavParams, private wpApiPosts : wpApiPosts) { | |
this.title = 'Cooking Shooking'; | |
//Get Latest posts | |
posts = this.wpApiPosts.getList() | |
.map(response => response.json()) | |
.map(data => {}) | |
} | |
ionViewDidLoad() { | |
console.log('ionViewDidLoad CustomHomePage'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment