AngularJS 中 $http 的语法

发布于 2025-01-16 20:32:33 字数 178 浏览 3 评论 0原文

有人可以向我解释一下:

.
.
.
$http(req)
.then(function()
{
.
.
.

“dot then”是什么意思? 总的来说,我发现很难理解 AngularJS 的语法,而且似乎没有任何地方对其进行解释。任何人都可以指导我到实际上为新手描述的地方吗?

Can someone please explain this to me:

.
.
.
$http(req)
.then(function()
{
.
.
.

What does "dot then" mean?
In general I find it hard to understand the syntax of AngularJS, and it does not appear to be explained anywhere. Can anyone direct me to somewhere it is actually described for newbees?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

∝单色的世界 2025-01-23 20:32:33

$http 返回 angularjs 承诺 https://docs.angularjs.org/api/ng/ service/$q

与原生 Promise 的主要区别是你不需要手动调用作用域摘要。

$http returns angularjs promise https://docs.angularjs.org/api/ng/service/$q

Main difference from native Promise is that you dont need to call scope digest manually.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文