Show progress circular during $http post?

后端 未结 7 1091
名媛妹妹
名媛妹妹 2021-02-08 16:05

What is the best way to use Angular Material\'s Progress circular component with a $http request?

I currently have the code like this below:

Progre

7条回答
  •  心在旅途
    2021-02-08 16:21

    I don't think you need the value attribute here with determinate mode. Instead you should use indeterminate mode, then show and hide the progress indicator using ngShow.

    
    

    And in your JS

    $scope.isLoading = true;
    $http.get("/posts")
       .success(function (data) {
            $scope.isLoading = false;
       });
    

提交回复
热议问题