diff options
| author | Igor Minar | 2010-11-24 22:50:34 -0800 |
|---|---|---|
| committer | Igor Minar | 2010-11-24 22:50:34 -0800 |
| commit | 6515adc1185e7684fc562e74eb1182b1703bca32 (patch) | |
| tree | 3831a32acd0bbf1975a9063a20b64404c0070d83 /src | |
| parent | b7aff92354a718c140c149945c5a78a98d61baa6 (diff) | |
| download | angular.js-6515adc1185e7684fc562e74eb1182b1703bca32.tar.bz2 | |
docs for angular.injector
Diffstat (limited to 'src')
| -rw-r--r-- | src/Injector.js | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/Injector.js b/src/Injector.js index 3e4058ac..6fc466b9 100644 --- a/src/Injector.js +++ b/src/Injector.js @@ -1,9 +1,20 @@ /** - * Create an inject method - * @param providerScope provider's "this" - * @param providers a function(name) which returns provider function - * @param cache place where instances are saved for reuse - * @returns {Function} + * @ngdoc function + * @name angular.injector + * @function + * + * @description + * Creates an inject function that can be used for dependency injection. + * + * @param {Object=} [providerScope={}] provider's `this` + * @param {Object.<string, function()>=} [providers=angular.service] Map of provider (factory) + * function. + * @param {Object.<string, function()>=} [cache={}] Place where instances are saved for reuse. Can + * also be used to override services speciafied by `providers` (useful in tests). + * @returns {function()} Injector function. + * + * @TODO These docs need a lot of work. Specifically the returned function should be described in + * great detail + we need to provide some examples. */ function createInjector(providerScope, providers, cache) { providers = providers || angularService; |
