delphimvcframework/samples/angularjs/www/js/services/proxy.js

24 lines
479 B
JavaScript
Raw Normal View History

2013-11-14 11:08:02 +01:00
//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;
}]);