I am cannot use .on in InAppBrowser i need help my code is:
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { InAppBrowser } from "@ionic-native/in-app-browser";
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
constructor(public navCtrl: NavController, private iab: InAppBrowser) {
}
doLoginTwitter() {
const browser = this.iab.create("http://xxxxxxx.com/api.php", '_self');
browser.on('loadstop').subscribe(function(event){
console.log("LOG: API Response");
console.log(event);
});
}
}
I’ve tried it anyway but it never works on loadstart and loadstop does not work I want to know why it does not work I’m testing on my cell phone using Ionic DevAPP but it still does not work, it opens the normal API window but it does not work fires the logs on the console I am using the ionic command --lab -c to start the ionic server and it does not work please help me.