Search code examples
angularjsionic-frameworkbrowserionic3inappbrowser

Why is it opening the link in external browser in android app when implemented using ionic InApp browser


I am trying to open a URL from ionic application, for which I have implemented InApp Browser, but its opening the URL in external browser of mobile, it should open the browser inside the application. Not sure where am I going wrong. Below is the code I tried, any guidance in this regard is much helpful, thank you..

openUrl(){
  this.platform.ready().then(() => {
  let url='http://192.168.0.7:8000/pay;
  const browser = this.iab.create(url, '_blank', 
  'hidden=yes,location=yes,clearsessioncache=yes,clearcache=yes');
  });
 // Inject scripts, css and more with browser.X
}

Solution

  • this works for me.

      openUrl(){
        let url='http://192.168.0.7:8000/pay';
        const browser = this.iab.create(url, '_blank', 
          'hidden=no,location=yes,clearsessioncache=yes,clearcache=yes');
        browser.show();
      }
    

    Notice: 1. hidden=no 2. browser.show()

    And this is the result: inAppBrowser Example