Created
October 6, 2013 04:08
-
-
Save CarterTsai/6849410 to your computer and use it in GitHub Desktop.
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
'use strict'; | |
// return the function's return value | |
angular.module('YahooHackApp') | |
.factory('Photosearch', function($resource) { | |
var base = $resource('/photosearch/:id', {id:'@id'},{ | |
get: {method: 'GET'}, | |
put: {method:'PUT'}, | |
del: {method: 'DELETE'} | |
}); | |
var factoryFunction = { | |
show : base.get, | |
edit : base.put, | |
del : base.del, | |
create : base.save | |
}; | |
return factoryFunction; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment