delphimvcframework/samples/angularjs/www/js/services/proxy.js
daniele.teti 77f382b672
2013-11-14 10:08:02 +00:00

24 lines
479 B
JavaScript

//PROXY RESTFULL
//{ 'get': {method:'GET'},
// 'save': {method:'POST'},
// 'query': {method:'GET', isArray:true},
// 'remove': {method:'DELETE'},
// 'delete': {method:'DELETE'} };
/**
* GET
* POST (insert new movie)
* PUT (update movie ) @id params
*/
app.factory('PXTODO', ['$resource', function($resource) {
var resource = $resource('todo' ,{},
{
put: {method: 'PUT' }
}
);
return resource;
}]);