From a5607e3061f5b0aa7988446025dba8f89413fd9d Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 1 Sep 2011 00:06:09 -0700 Subject: docs(API): various api doc fixes from Toni --- src/Injector.js | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/Injector.js') diff --git a/src/Injector.js b/src/Injector.js index d2bafcf5..912e911c 100644 --- a/src/Injector.js +++ b/src/Injector.js @@ -10,11 +10,12 @@ * dependency injection (see {@link guide/dev_guide.di dependency injection}). * * Angular creates an injector automatically for the root scope and it is available as the - * {@link angular.scope.$service $service} property. Creation of the injector automatically creates - * all of the `$eager` {@link angular.service services}. + * {@link angular.scope.$service $service} property. Creating an injector doesn't automatically + * create all of the `$eager` {@link angular.service services}. You have to call `injector.eager()` + * to initialize them. * - * @param {Object=} [factoryScope={}] `this` for the service factory function. - * @param {Object.=} [factories=angular.service] Map of service factory + * @param {Object=} [factoryScope={}] The `this` for the service factory function. + * @param {Object.=} [factories=angular.service] Map of the service factory * functions. * @param {Object.=} [instanceCache={}] Place where instances of services are * saved for reuse. Can also be used to override services specified by `serviceFactory` @@ -22,19 +23,19 @@ * @returns {function()} Injector function: * * * `injector(serviceName)`: - * * `serviceName` - `{string=}` - name of the service to retrieve. + * * `serviceName` - `{string=}` - Name of the service to retrieve. * * The injector function also has these properties: * - * * an `invoke` property which can be used to invoke methods with dependency-injected arguments. + * * An `invoke` property which can be used to invoke methods with dependency-injected arguments. * `injector.invoke(self, fn, curryArgs)` - * * `self` - "`this`" to be used when invoking the function. - * * `fn` - the function to be invoked. The function may have the `$inject` property which - * lists the set of arguments which should be auto injected + * * `self` - The "`this`" to be used when invoking the function. + * * `fn` - The function to be invoked. The function may have the `$inject` property that + * lists the set of arguments which should be auto-injected. * (see {@link guide/dev_guide.di dependency injection}). - * * `curryArgs(array)` - optional array of arguments to pass to function invocation after the - * injection arguments (also known as curry arguments or currying). - * * an `eager` property which is used to initialize the eager services. + * * `curryArgs(array)` - Optional array of arguments to pass to the function + * invocation after the injection arguments (also known as curry arguments or currying). + * * An `eager` property which is used to initialize the eager services. * `injector.eager()` */ function createInjector(factoryScope, factories, instanceCache) { -- cgit v1.2.3