According to AngularJS doc, calls to $http
return the following:
Returns a promise object with the standard then
Official Notice: success and error have been deprecated, please use the standard then method instead.
Deprecation Notice: The $http legacy promise methods success and error have been deprecated. Use the standard then method instead. If $httpProvider.useLegacyPromiseExtensions is set to false then these methods will throw $http/legacy error.
link: https://code.angularjs.org/1.5.7/docs/api/ng/service/$http
screenshot: view the screenshot