Implement the concept of the promise disposer pattern:
var spinnerSemaphore = 0;
function maintain(fn){
spinnerSemaphore++;
var result = $q.when(fn());
fn().then(function(){ spinnerSemaphore--; },
function(){ spinnerSemaphore--; });
return result;
}
This approach allows you to:
maintain(function(){
return $http.get(...);
});
maintain(function(){
return $http.get(...);
});
maintain(function(){
return $http.get(...);
});
maintain(function(){
return $timeout(...); // this applies to other promises as well
});
Connect displaying the spinner to the variable spinnerSemaphore
(where a value of 0 means hiding the spinner, and any value greater than 0 means showing it).