离子加载不起作用

时间:2016-09-15 06:50:19

标签: ionic-framework

我正在研究离子应用程序。 我想在获取数据时显示加载符号。所以我使用了以下代码:

session_commit

但它仍无效。

1 个答案:

答案 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();
};
相关问题