我正在使用Ionic 2並試圖用cordova InAppBrowser打開外部鏈接。離子2 InAppBrowser網址無法打開
launch(url) {
this.platform.ready().then(() => {
InAppBrowser.open(url, "_system", "location=yes");
console.log("link viewed");
});
}
但是,當我在手機上測試應用程序時,這並未打開鏈接。此外,當我把它改成這樣cordova.InAppBrowser.open(url, "_system", "location=yes");
其與語法錯誤說找不到cordova
在window.open(url, "_system", "location=yes");
工作正常的瀏覽器返回它返回在控制檯Your current usage of the InAppBrowser plugin is depreciated as of [email protected] Please check the Ionic Native docs for the latest usage details.
。
任何人都知道更新的方式讓InAppBrowser打開?
lols我發現在2個薄荷糖中。 –
是的,我只發現了以前的語法離子2以前仍在開發中 – SGhaleb
良好的工作繼續下去...請改善您的答案,然後我會刪除我的一個 –