【发布时间】:2016-12-16 15:22:45
【问题描述】:
我正在使用 Ionic 2 并尝试使用 cordova InAppBrowser 打开外部链接。
launch(url) {
this.platform.ready().then(() => {
InAppBrowser.open(url, "_system", "location=yes");
console.log("link viewed");
});
}
但是,当我在手机上测试应用程序时,这不会打开链接。此外,它在控制台中返回这个 Your current usage of the InAppBrowser plugin is depreciated as of ionic-native@1.3.8. Please check the Ionic Native docs for the latest usage details.
当我将其更改为 cordova.InAppBrowser.open(url, "_system", "location=yes"); 时,它返回一个语法错误,提示找不到 cordova
在浏览器中window.open(url, "_system", "location=yes"); 工作正常。
有人知道打开 InAppBrowser 的更新方法吗?
【问题讨论】:
标签: cordova ionic-framework ionic2 inappbrowser