Ionic 2 http get on external url

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

this.http.get(‘http://faithministriesafrica.org/faith.json?limit=10’).map(res => {
this.posts = res.json();
});

thanks i found the problem was with chrome i use a plugin and everything is working

1 Like

please tell me how did you solved this problem
i have the same issue

I downloaded allow-control-origin plugin for chrome