Skip to content

Instantly share code, notes, and snippets.

@CarterTsai
Created October 6, 2013 04:08
Show Gist options
  • Save CarterTsai/6849410 to your computer and use it in GitHub Desktop.
Save CarterTsai/6849410 to your computer and use it in GitHub Desktop.
'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