Skip to content

Instantly share code, notes, and snippets.

@icfantv
Created May 29, 2016 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icfantv/e5181ec253eefa9df33b2d3f92a2a008 to your computer and use it in GitHub Desktop.
Save icfantv/e5181ec253eefa9df33b2d3f92a2a008 to your computer and use it in GitHub Desktop.
Sample NG1 Service (ES5)
angular.module('services', [])
.service('MyService', ['$resource', MyService]);
function MyService($resource) {
var resource = $resource(...);
this.getAll() {
return resource.$get(...);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment