From 6515adc1185e7684fc562e74eb1182b1703bca32 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 24 Nov 2010 22:50:34 -0800 Subject: docs for angular.injector --- src/Injector.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src') 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.=} [providers=angular.service] Map of provider (factory) + * function. + * @param {Object.=} [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; -- cgit v1.2.3