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
First set some model:
$scope.loading=false;
Bind that model with progress circular element ng-show property:
<md-progress-circular ng-show="loading" md-mode="indeterminate"></md-progress-circular>
Set it to true before calling $http request and set it to false on $http .success:
$scope.loading=true;
$http.get("/posts")
.success(function (data) {
$scope.posts = data;
$scope.loading=false;
})
Hope that helps.