Skip to content

Instantly share code, notes, and snippets.

@ryananthonydrake
Created October 14, 2015 10:03
Show Gist options
  • Save ryananthonydrake/d95f2e94060d7f624954 to your computer and use it in GitHub Desktop.
Save ryananthonydrake/d95f2e94060d7f624954 to your computer and use it in GitHub Desktop.
Provider Recipe
// The $get function is where you return an object and inject services
// Providers run before everything else, so the only thing you can inject into them is other providers
angular.module("<ModuleName>").provider("<ServiceName>", function <ServiceName>Provider(otherProvider) {
this.$get <factory function>
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment