问题
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