Is there a way to emulate jquery 'complete' callback with angular $http module? I have some code I would like to execute no matter whether the request succeeded or failed and at the moment I find myself having to write this:
$http.get(someUrl).success(function(){
successCode();
completeCode();
}).error(function(){
errorCode();
completeCode();
})
but I would rather write something like:
$http.get(someUrl).success(function(){
successCode();
}).error(function(){
errorCode();
}).complete(function(){
completeCode();
})
I've tried also using the promise API but I end up having the same problem. Any suggestion?