Personally I found using $http less restrictive - there seem to be some edge cases where $resource behaves oddly. Ideally what you should be doing with REST calls is pushing them out to Angular Services (
http://docs.angularjs.org/guide/dev_guide.services.creating_...) rather than making them directly in your controller.
Here's a simple example:
appServices.factory('Thing', function($http) {
var Thing = function(data) {
angular.extend(this, data);
}
Thing.all = function() {
return $http.get('/things).then(function(response) {
return new Thing(response.data);
});
}
Thing.get = function(id) {
return $http.get('/things/' + id).then(function(response) {
return new Thing(response.data);
});
}
Thing.delete = function(id) {
return $http.delete('/things/' + id).then(function(response) {
return new Thing(response.data);
});
}
Thing.create = function(data) {
return $http.post('/things', data).then(function(response) {
return new Thing(response.data);
});
}
Thing.update = function(data, id) {
return $http.put('/things/' + id, data).then(function(response) {
return new Thing(response.data);
});
}
return Thing;
});
In your controller, inject the service:
function thingCtrl($scope, Thing) {
Thing.all().then(function(data) {
$scope.things = data;
});
}
thingCtrl.$inject = ['$scope', 'Thing'];