InAppBrowser(Apache Cordova插件)在Windows 8.1中无法打开 [英] InAppBrowser (Apache cordova plugin) does not open in Windows 8.1

查看:104
本文介绍了InAppBrowser(Apache Cordova插件)在Windows 8.1中无法打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio工具开发针对Apache Cordova(Cordova CLI:4.3.1)和AngularJS的应用.

I am developing an app using visual studio tools for apache Cordova (Cordova CLI : 4.3.1) and AngularJS.

它通过ngcordova库使用InAppBrowser插件. 这是我的代码:

It uses InAppBrowser plugin via ngcordova library. Here is my code:

 var url = "http://myurl.com";
 var target = "_blank";
 var options = {
            location: 'no',
            toolbar:'no',
            hidden: 'no'
        };

 document.addEventListener('deviceready', function () {

            var browserRef = $cordovaInAppBrowser.open(url, target, options).then(function (event) {
            }, function (error) {
                console.log("Error: " + error.message);
            });

        }, false);

当我在Windows 8.1(在本地计算机上)上部署该应用程序时,我可以在调试器上看到创建的Webview没有错误,并且触发了loadstop事件.但它没有显示,我看不到外部页面.

When i deploy the app on windows 8.1 (on my local machine), i can see on debugger that a webview is created without error, and loadstop event is fired. but it is not displayed, i can't see the external page.

在iOS上运行正常.我暂时无法在android上尝试.

It is working fine on iOS. I cannot try on android for now.

任何帮助将不胜感激.

Any help would be greatly appreciated.

推荐答案

您可以尝试替换

$cordovaInAppBrowser.open(.........

使用

window.open(..........

这篇关于InAppBrowser(Apache Cordova插件)在Windows 8.1中无法打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆