Is it possible to prevent a request using angularjs interceptors ?
$provide.factory('myHttpInterceptor', function($q, someService) {
return {
'request': function(config) {
// here I'd like to cancel a request depending of some conditions
}
}
});
$httpProvider.interceptors.push('myHttpInterceptor');