How to: Opening links in content in system browser instead of Cordova browser wrapper

Am I the only one who has the problem where window.open('http://apache.org', '_system') still opens in my app?

I’m on Cordova version 3.8.0

I was seeing the same problem. turns out that href was doing its thing regardless of onclick that was trying open system browser. paste in the directive from @sander which is a tiny mod from @ndudenhoeffer and you wont need to change anything else.

The thing that bothers me about this is that according to cordova docs, you should be able to specify in the config file which urls will open in an external browser by setting:

<access origin="http://example.com/*" launch-external="yes" />

However this of course doesn’t work. I briefly looked at the definition of shouldStartLoadWithRequest in CDVViewController but it looks like it returns true as long as the scheme is http, https, ftp, or ftps.

Anyway I’ll take this discussion to Apache.

Hi all,

Thank you for all posts.
I liked to add a function that converts href to ng-click text. I couldn’t type codes properly here, so here is the link.

thats work great on browser, but why link be a not clickable on device?

NIC RABOY has written a beautiful blog regarding this, with a cordova plugin we can easily extend the url within the template. Take a look at this - https://www.thepolyglotdeveloper.com/2014/07/launch-external-urls-ionicframework/

Woks perfectly. Thanks

This was a great solution that worked for most of my issues I was having. The only thing though it seems to affect is my iframes where I have my Youtube vIdeos that are embedded into my Wordpress Blog. Is there anyway to fix this issue do you know?

Do these filter or directive solutions require the cordova whitelist plugin or work with it or should I uninstall it.