Angular - extending $resource subobject with custom methods

前端 未结 4 573
不思量自难忘°
不思量自难忘° 2020-12-02 07:42

In most cases the result of .query() method is an array, which can be easily extended with some methods (business logics) with the follow

4条回答
  •  Happy的楠姐
    2020-12-02 08:05

    You could put the metadata in a header. I always put paging data there. That way your query will still return an array, which I believe is a good thing. Queries should return arrays of data, not single data.

提交回复
热议问题