Opening links with Inappbrowser plugin

I used curl to get my content and within the content it contain links that I need them to open in system browser. I came across this plugin :

But how should I use it?

Take a look at ngcordova, the docs for the inappbrowser can be found here:

ngcordova is basically an angularjs wrapper for cordova plugins, making it much easier to use. Code for the inappbrowser specifically can be found here:

Add the factory to your app or controller. Afterwards you can inject $cordovaInAppBrowser to your controller and use it as described in the docs.

1 Like

I found a simple solution

    	$scope.threadContent = data;

    	//open in external browser
          $timeout(function () {
		   $('.mylink').click(function () {
		     var url = $(this).attr('href');, '_system', 'location=yes');
		     return false;

Hi @eldy,

If you ever want to ditch jQuery, here is another solution for opening all links in the InAppBrowser:

Just change the “_blank” to “_system” when following the tutorial. You may experience better performance without jQuery.


1 Like

Hi nicraboy,
Thanx for the tip on dynamic links. You saved my day.

No problem buddy :smile: