Created
December 12, 2016 16:45
-
-
Save codenamejason/a1437cb17ab21bbb51de06a2c3134f77 to your computer and use it in GitHub Desktop.
Using $provide.factory
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
function factory(name, factoryFn, enforce) { | |
return provider(name, { | |
$get: enforce != false ? enforceReturnValue(name, factoryFn) : factoryFn | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment