Ionic 2 app can fetch json data in browser but nothing in Device


I have created an app for my WordPress website.
I fetch posts through WordPress API. It’s json data. When i run “ionic serve” command, it runs without any issue.

But when i install the app in my android device, it runs the jsonError() function and wont fetch any data. I have a working connection.
Please tell me what could be the reason and how can i debug my app on mobile?


constructor(public navCtrl: NavController, public http: Http, public toastCtrl: ToastController) {
this.http.get(‘’).map(res => res.json()).subscribe(
data => {
this.posts = data;
this.slider = this.posts[0];
err => {

jsonError() {
let toast = this.toastCtrl.create({
message: ‘A technical glitch.’,
position: ‘bottom’,
showCloseButton: true,
closeButtonText: ‘OK’,
dismissOnPageChange: true
toast.onDidDismiss(() => {