First of all you need to follow these instructions on how to install angular-spinkit in your project.
Second of all, please see this Plnkr to see how I managed to use angular spinkit for GET calls.
These are the main steps:
Insert your <circle-spinner></circle-spinner>
directive into the code but make it invisible using ng-show
like this:
<circle-spinner ng-show="showSpinner"></circle-spinner>
showSpinner
is a $scope variable that we iniate as false
as we don't want the spinning circle to show until we make the $http
call.
Make your GET call using the angular $http
service. Use a function to do so. When you call the function, the first thing is to set the $scope.showSpinner
variable to true
so your spinner is visible. Then you make the $http
call.
Next step is to handle the GET response. When the call is finished (you have the success or the error options), you have to tell the $scope.showSpinner
variable to become false which means the ng-show
from the <circle-spinner>
directive will become false so the circle is not displayed anymore.
Long story short, you show an invisible spinning circle, you make an $http
call that makes it visible; when the response is back, the spinning circle is not visible anymore.