import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import { Http } from ‘@angular/http’;
import ‘rxjs/add/operator/map’;
@Component({
selector: ‘page-page1’,
templateUrl: ‘page1.html’
})
export class Page1 {
posts: any;
constructor(public http: Http,public navCtrl: NavController) {
this.http.get(‘http://faithministriesafrica.org/faith.json?limit=10’).map(res => res.json()).subscribe(data => {
this.posts = data.database;
});
}
}
this is not working what am i missing