mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-17 16:55:54 +01:00
24 lines
479 B
JavaScript
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;
|
||
|
}]);
|
||
|
|