【发布时间】:2017-12-10 15:12:41
【问题描述】:
搜索了很多,但找不到正确的解决方案。
I am trying to open links from my app to default browser of my IOS device,
但它不起作用。它与我的 android 设备完美配合。
-
我的插件安装正确,(我可以在我的应用程序的cordova插件列表中看到)
以下是我尝试过的语法:
window.open(this.href, '_system');
window.open(this.href, '_blank', {closebuttoncaption: '关闭', toolbar: 'yes', 'location=yes'});
window.open(this.href, '_blank', {closebuttoncaption: 'Close', toolbar: 'yes'});
window.open(this.href, '_system', 'location=yes')
与 cordova.InAppBrowser.open 相同的解决方案,这作为起始语法。
除了尝试使用控制器功能之外
链接
$scope.openInExternalBrowser = 函数(路径){
var options = "closebuttoncaption=关闭,toolbar=yes"; if($ionicPlatform.is('ios') == true){
window.open(path, '_blank', {'closebuttoncaption': 'Close', 'toolbar':'yes', 'location=yes'});}其他{ window.open(路径,“_system”,“位置=是”); } }
所以寻找一些合适的解决方案,这会奏效。
感谢和问候,
索普
【问题讨论】:
标签: android ios cordova ionic-framework hybrid-mobile-app