As you might already know, $resource never intended to be a replacement for a more powerful $http service, and, as such, the authors simply didn't bother exposing a more powerful and configurable API.
That said, the only way to configure the resource on run-time is to wrap it in it's own custom factory. But that just makes things uglier, IMO.
app.factory('Dummy', [
'$resource',
function ($resource) {
return function(config){
return $resource('http://dummyServer/dummyApp/dummyREST/:methodName', {}, {
query: angular.extend({
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
isArray: false // <-- isArray: someParameter ???
}, config)
});
};
}
]);
Controller:
$scope.myDummyObj = Dummy({isArray: true, method: 'GET'})
.query({methodName: 'dummyMethod'});