我正在研究离子应用程序。 我想在获取数据时显示加载符号。所以我使用了以下代码:
session_commit
但它仍无效。
答案 0 :(得分:0)
您必须在AngularJs函数中使用$scope
变量。
$scope.showLoading = function () {
console.log("Loading");
$ionicLoading.show({
content: 'Loading',
animation: 'fade-in',
showBackdrop: true,
maxWidth: 200,
showDelay: 0
});
};
$scope.hideLoading = function () {
console.log("hide loading");
$ionicLoading.hide();
};