How to display wait message in AngularJS while data loading?

后端 未结 5 727
余生分开走
余生分开走 2021-02-04 03:22

I\'m new in AngularJS and trying to find the way how to display wait message while data loading? I mean data starts loading, display message and remove it when data loading is d

5条回答
  •  借酒劲吻你
    2021-02-04 04:08

    Loading...

    JS

    $scope.data.dataLoading = true;
    
    return someService.getData().then(function (results) {                    
        ...
    }).finally(function () {
        $scope.data.dataLoading = false;
    });
    

提交回复
热议问题