Created
February 6, 2015 14:39
-
-
Save takuhou/d6e57636e4b562a99fff to your computer and use it in GitHub Desktop.
Angular.js備忘録 ref: http://qiita.com/takuhou/items/61193575ce1045f8bc18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TestService = angular.module('TestService',['ngResource']); | |
TestService.factory('Test',['$resource',function ($resource) { | |
return $resource('http://localhost/api/test/:id',{},{ | |
query: {method: 'GET', isArray: true}, | |
show: {method: 'GET'}, | |
save: {method: 'POST'}, | |
update: {method: 'PUT'}, | |
remove: {method: 'DELET'} | |
}); | |
} | |
]); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment