Created
February 8, 2015 20:17
-
-
Save fesor/b20169376798d950e02f to your computer and use it in GitHub Desktop.
provider.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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