I don't believe there is any difference. Angular source code:
angular.module('ngResource', ['ng']).
factory('$resource', ['$http', '$parse', function($http, $parse) {
var DEFAULT_ACTIONS = {
'get': {method:'GET'},
'save': {method:'POST'},
'query': {method:'GET', isArray:true},
'remove': {method:'DELETE'},
'delete': {method:'DELETE'}
From Eric W. (his edit was rejected before I could approve it):
AngularJS by Green & Seshadri warns that the delete method may not work in IE unless bracket notation is used (myResource[delete]()
) as delete
is a reserved word. So you may want to consider using the remove
method instead.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…