I am trying to get the following Angular-Spinner working in my project:
I am trying to get it working with http.get calls. So far I have:
in controllers:
$scope.loading = true;
$http.get('js/data/test.json').success(function(results){
$scope.section = results.section;
$scope.loading = false;
});
In the view:
<span us-spinner="{radius:15, width:4, length: 8}" ng-show="loading"></span>
<div ng-repeat="post in section" class="inner"></div>
Currently the loading shows very fast, I want to know is this the correct way to use it? How can I delay it slightly before all the data loads and a spinner is shown. Any ideas?