I have an IFrame containing a page with two links, one to an external domain and one to a page on the same root domain as the IFrame page but on a different subdomain. I need both to open in Safari rather than in the Ionic app, but I’m only seeing the external links opening in safari; the sub-domain links open in Ionic, replacing the entire mobile app.
I’ve tried using both the target attribute and window.open, but with the same results. Where the IFrame page is on a domain called www.mydomain.com:
<a href='https://www.google.com/' target='_myCustomTarget'>Google.com</a>
<a href='https://subdomain.mydomain.com/' target='_myCustomTarget'>subdomain.mydomain.com</a>
The first link opens in safari; the second link opens in Ionic, replacing the entire mobile app. window.open has the same results:
<a href='javascript:window.open("https://www.google.com/", "_myCustomTarget")'>Google.com</a>
<a href='javascript:window.open("https://subdomain.mydomain.com/", "_myCustomTarget")'>subdomain.mydomain.com</a>
Is there a way to have the sub-domain link open in Safari as well?
$ ionic info
global packages:
@ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.1
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.4.0
System:
Node : v6.10.0
OS : OS X El Capitan
Xcode : Xcode 8.2.1 Build version 8C1002
ios-deploy : 1.9.1
ios-sim : 5.0.13
npm : 3.10.10