Angular js: what is the difference between $http and $resource

后端 未结 2 1639
栀梦
栀梦 2021-02-20 11:33

I need to better understand the difference between $http and $resource and when to use each

2条回答
  •  深忆病人
    2021-02-20 11:51

    $resource is built on top of $http.

    $http is normal ajax, it can be used for any form of web service.

    $resource is specifically for RESTful service.

    More details on this

    AngularJS $http and $resource

提交回复
热议问题