Reputation: 391
Please help me find a solution I have spend 3 days trying to fix this.
I have a phonegap application with iframe in one of the pages. I used target='_blank' in the iframe to open the link in new window outside the APP but instead it opens in the app replacing the whole APP UI.
Upvotes: 1
Views: 431
Reputation: 367
Did you used inappbrowser
Add the plugin using your CLI cordova plugin add cordova-plugin-inappbrowser
Here is an Example:
function getDirect() {
var ref = cordova.InAppBrowser.open('http://www.google.lk','_system' , 'location=yes');
}
_system : Opens in the system's web browser.
_self : Opens in the Cordova WebView if the URL is in the white list, otherwise it opens in the InAppBrowser.
_blank : Opens in the InAppBrowser.
Upvotes: 2