Hi,
.config(function ($httpProvider)
{
$httpProvider.defaults.cache = true;
var $http,
$helpers,
interceptor = ['$q', '$injector', '$timeout', function ($q,
$injector, $timer)
{
var error;
function success(response)
{
// get $http via $injector because of circular
dependency problem
$http = $http || $injector.get('$http');
if ($http.pendingRequests.length < 1)
{
// hide spinner
}
return response;
}
function error(response)
{
// get $http via $injector because of circular
dependency problem
$http = $http || $injector.get('$http');
if ($http.pendingRequests.length < 1)
{
// hide spinner
}
return $q.reject(response);
}
return function (promise)
{
// show spinner
return promise.then(success, error);
}
}];
$httpProvider.responseInterceptors.push(interceptor);
}
);
I have got GridView from DevExpress and I am calling their native method to
refresh grid ( IDofGrid.Refresh() ) and this interceptor does not detect
this ajax call. Is it working only on events called by $http service? If so
how can I detect in angularJS "ALL AJAX PENDING REQUESTS".
Any ideas?
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.