Skip to content

Instantly share code, notes, and snippets.

@fesor
Created February 8, 2015 20:17
Show Gist options
  • Select an option

  • Save fesor/b20169376798d950e02f to your computer and use it in GitHub Desktop.

Select an option

Save fesor/b20169376798d950e02f to your computer and use it in GitHub Desktop.
provider.js
// module.provider, available in config phase
function defaultProvider () {
this.$get = defaultFactory;
}
// module.factory
function defaultFactory (depService) {
return new SomeService(depService);
}
// module.service
function someService (depService) {
this.depService = depService;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment