Ionic 2|3 : Open all links inside inAppBrowser


Is there a way to open all links using the InAppBrowser from '@ionic-native/in-app-browser'. (

Mayby by changing the function ?

I have something like this :

<a href="">Link</a>
And i want to open the InAppBrowser when the user click on the link.

Thank you.


why would you like to use links???


That’s something i can’t change, because the template is downloaded from an external web service.


In that case you can refer to the following link:


I’ve this : = (url, target?, opts?) => {
            return null;

openLink(urlOpening: string) {
  this.browser = this.iab.create(urlOpening, '_blank', 'location=yes,clearsessioncache=yes,clearcache=yes');   

it works fine on : <p onclick="'')">link test</p>

But it doesn’t work on href .

Do you have an idea ?


try this:

 <a href="#" onclick="'', '_system', 'location=yes'); return false;">
                Open Google