Open link with system browser


#1

Hi folks,

I think I’ve tried everything but still no luck. I need to open links with the system browser, but I can’t use InAppBrowser as the whole text that contains the link is loaded from a remote service.

Currently all links are opened in a webview without header and menu, so the user is stuck once he/she clicks.

If I could at least add an header with a back button it would be ok but I’m currently not able to do that neither.

Any help? Thanks!
Diego


#2

check this plugin themeable-browser


#3

unfortunately that plugin is no more mantained.


#4

I found a solution, ungly and dirty but the only one I found:

    document.addEventListener('click', (e: any) => {
      console.log(e.target);

      if(e.target && e.target.href)
        console.log("opening " + e.target.href);
        this.iab.create(e.target.href, '_system');
        
        e.preventDefault();
    });

where “this.iab” is an instance of InAppBrowser.