How to open external Urls outside the inappbrowser and not inside the Inapp browser


#1

hello guys !
i wrapped a website in ionic inapp browser in which the website contains some external site which has to be opened in system browser and i don’t have any idea how to open it in system browser.

any idea of how to achieve it ? the external sites should open in system browser instead of native inapp browser.

export class HomePage {

constructor(public navCtrl: NavController, private iab: InAppBrowser, public platform: Platform, 
private fileOpener: FileOpener, private transfer: FileTransfer, private file: File, private diagnostic: 
 Diagnostic) {
 platform.ready().then(() => {
 
  let browser = this.iab.create('https://www.tutorialspoint.com/ionic/index.htm','_blank',{zoom:'yes',location:'no'});

 browser.show();
     });
   }

for eg : window.open(“https://plus.google.com/u/0/116678774017490391259/posts”,_system) is a external link in that website inside inappbrowser

i wanna open it outside the inapp browser


#2
  let browser = this.iab.create('https://www.tutorialspoint.com/ionic/index.htm','_system');

#3

But it makes everything outta the inapp browser…
I only want the external links to be navigated outside the inappbrowser


#4

Yeah that’s what you asked for… be more specific please


#5

no tats not what i meant :frowning:
i only want the Facebook links and Instagram links to be opened outside the inappbrowser…
Is it possible?


#6
RedirectToCorresponding(url: string){
  if (( url.split("facebook").length > 1 ) || ( url.split("instagram").length > 1 )) {
    // redirect outside
  } else {
    // redirect inside
  }
}

What’s the problem here?


#7

to redirect outside we should use window.open() right?