Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

http.post has no always callback always() in angular 1.2.1

Tags:

angularjs

In this angular project I'm getting this error

"Object #<Object> has no method 'always'"

when I try run this post:

var http = $injector.get('$http');


http.post(error_url, data)
            .success(handleAPIResponse)
            .error(handleAPIResponse)
            .always(
            function () {
like image 865
FutuToad Avatar asked Jan 10 '23 21:01

FutuToad


1 Answers

use finally instead. this was changed in version 1.2.0

like image 71
FutuToad Avatar answered Jan 22 '23 11:01

FutuToad