【问题标题】:Difference between xmlhttp (js) and $http (AngularJS)xmlhttp (js) 和 $http (AngularJS) 的区别
【发布时间】:2019-03-12 19:32:18
【问题描述】:

在普通的 JavaScript 中,我们将 xmlhttp 用于 Ajax。 Angular 使用 $http 提供 ajax 服务。 $httpxmlhttp 相比有什么额外的东西吗?

【问题讨论】:

    标签: angularjs ajax xmlhttprequest


    【解决方案1】:

    AngularJS 中的$http 不能配置为同步,而xmlhttp 可以同步或异步。在 AngularJS 世界中,我们使用$http,因为它是处理请求的“Angular 方式”。

    【讨论】:

      猜你喜欢
      • 2012-07-21
      • 2023-03-11
      • 2015-11-27
      • 1970-01-01
      • 2015-09-15
      • 2015-12-07
      • 2016-04-22
      • 2014-10-09
      • 2014-02-16
      相关资源
      最近更新 更多