【发布时间】:2016-09-30 16:50:07
【问题描述】:
我已经安装了cordova-plugin-network-information typing:
cordova plugin add cordova-plugin-network-information
另外,我在 index.html 中添加了 ng-cordova.min.js。该插件在 android 中运行良好,使用:
if(navigator.connection.type == "none"){
$ionicLoading.hide()
$ionicPopup.alert({
title: "Internet Disconnected",
content: "There is no internet connection. Please check the connection and try again."
})
.then(function(result) {
ionic.Platform.exitApp();
});
}
但在 ios 中(通过 ionic emulate ios)应用程序甚至无法加载。有什么想法吗?
【问题讨论】:
-
尝试发布错误跟踪。否则尝试在 ios 设备上安装应用程序并在 safari 中检查任何控制台错误跟踪
标签: javascript cordova ionic-framework