ionic 2 InAppBrowser url 未打开
ionic 2 InAppBrowser url not opening
我正在使用 Ionic 2 并尝试使用 cordova InAppBrowser 打开外部 link。
launch(url) {
this.platform.ready().then(() => {
InAppBrowser.open(url, "_system", "location=yes");
console.log("link viewed");
});
}
但是,当我在 phone 上测试应用程序时,这不会打开 link。此外,它 returns 在控制台中 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");
时,它 returns 出现语法错误,提示无法找到 cordova
在浏览器中 window.open(url, "_system", "location=yes");
工作正常。
有人知道打开 InAppBrowser 的更新方法吗?
几个小时后,深入查看文档,我找到了原因。
launch(url) {
this.platform.ready().then(() => {
new InAppBrowser(url, "_system", "location=yes");
console.log("link viewed");
});
}
我正在使用 Ionic 2 并尝试使用 cordova InAppBrowser 打开外部 link。
launch(url) {
this.platform.ready().then(() => {
InAppBrowser.open(url, "_system", "location=yes");
console.log("link viewed");
});
}
但是,当我在 phone 上测试应用程序时,这不会打开 link。此外,它 returns 在控制台中 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");
时,它 returns 出现语法错误,提示无法找到 cordova
在浏览器中 window.open(url, "_system", "location=yes");
工作正常。
有人知道打开 InAppBrowser 的更新方法吗?
几个小时后,深入查看文档,我找到了原因。
launch(url) {
this.platform.ready().then(() => {
new InAppBrowser(url, "_system", "location=yes");
console.log("link viewed");
});
}