yandex
loader

please wait

  • Sophia Chang Feb-12-2019 07:19:51 AM ( 2 months ago )

     

    I need close InAppBrowser when some page starts load, my code:

     
    constructor(private iab: InAppBrowser) {}
    
    const options: InAppBrowserOptions = {
      zoom: 'no',
      hardwareback: 'no',
      location: 'no'
    };
    
    const browser = this.iab.create('https://ionicframework.com/', '_self', options);
    browser.on('loadstart').subscribe(event => {
      if (event.url === 'https://ionicframework.com/getting-started') {
        console.log('close!');
        browser.close();
      }
    });
    

    When /getting-started page starts load i see in Console 'close!', but browser won't close

  • Dipti Singh Feb-12-2019 07:20:52 AM ( 2 months ago )

    You could add 'location=yes' as an attribute. forum.ionicframework.com/t/… please check this doc and @Shequeri answer

Please login

Similar Discussion

Recommended For You