Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70748

Inappbrowser loading spinner help (not working)

$
0
0

@ahmetozcan wrote:

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

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70748

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>