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

后端 未结 2 1626
栀梦
栀梦 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:35

    From the $resource docs:

    A factory which creates a resource object that lets you interact with RESTful server-side data sources.

    The returned resource object has action methods which provide high-level behaviors without the need to interact with the low level $http service.

    $resource is a higher level service than $http.

提交回复
热议问题