gpt4 book ai didi

angularjs - http.post 在 angular 1.2.1 中没有始终回调 always()

转载 作者:行者123 更新时间:2023-12-04 23:01:30 24 4
gpt4 key购买 nike

在这个 Angular 项目中,我收到此错误

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

当我尝试运行这篇文章时:
var http = $injector.get('$http');


http.post(error_url, data)
.success(handleAPIResponse)
.error(handleAPIResponse)
.always(
function () {

最佳答案

使用 finally反而。这已在 1.2.0 版中更改

关于angularjs - http.post 在 angular 1.2.1 中没有始终回调 always(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22763077/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com