here is my code but doesn’t work on iOS.
import { Component } from '@angular/core';
import { InAppBrowser, InAppBrowserEvent} from '@ionic-native/in-app-browser/ngx';
import { SpinnerDialog } from '@ionic-native/spinner-dialog/ngx';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
constructor(private iab: InAppBrowser,private spinnerDialog: SpinnerDialog) {
}
ngOnInit(){
const browser = this.iab.create('http://google.com','_self',{location:'no'}); /*3*/
browser.on('loadstart').subscribe((eve) => {
this.spinnerDialog.show(null, null, true);
}, err => {
this.spinnerDialog.hide();
})
browser.on('loadstop').subscribe(()=>{
this.spinnerDialog.hide();
}, err =>{
this.spinnerDialog.hide();
})
browser.on('loaderror').subscribe(()=>{
this.spinnerDialog.hide();
}, err =>{
this.spinnerDialog.hide();
})
browser.on('exit').subscribe(()=>{
this.spinnerDialog.hide();
}, err =>{
this.spinnerDialog.hide();
})
}
}
thnx for help