Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
The documentation doesn't seem to specify: http://docs.angularjs.org/api/ngResource.$resource
query主要区别在于isArray: true:
query
isArray: true
'get' : {method:'GET'}, 'query': {method:'GET', isArray:true}
这意味着您将get在请求单个对象和query请求集合时使用。例如:
get
Users.get({userId:123}); // returns a single user Users.query(); // returns a collection of all users.