InAppBrowser (Apache cordova plugin) does not open in Windows 8.1

假装没事ソ 提交于 2019-12-10 10:09:07

问题


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

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);

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.

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

Any help would be greatly appreciated.


回答1:


can you try replacing

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

With

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


来源:https://stackoverflow.com/questions/31086132/inappbrowser-apache-cordova-plugin-does-not-open-in-windows-8-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!