Skip to content

Instantly share code, notes, and snippets.

@0xjmp
Created March 17, 2015 23:49
Show Gist options
  • Save 0xjmp/392d776995650fe076d3 to your computer and use it in GitHub Desktop.
Save 0xjmp/392d776995650fe076d3 to your computer and use it in GitHub Desktop.
this.Factory = function($resource) {
return $resource('/user/:userId', {userId: '@id'});
};
this.Controller = function($scope) {
$scope.get = function() {
Factory.get({userId: 123}, function(response_data) {
user = response_data.user;
});
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment