From cae9ad4ba9c31dfa9e1aa2acc945dfc8242d1c72 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 13 Feb 2012 17:03:19 -0800 Subject: [PATCH] docs(decorator): add missing decorate docs --- src/Injector.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Injector.js b/src/Injector.js index c1b9e69c877f..a9ec6e5db7ea 100644 --- a/src/Injector.js +++ b/src/Injector.js @@ -252,6 +252,26 @@ function inferInjectionArgs(fn) { */ +/** + * @ngdoc method + * @name angular.module.AUTO.$provide#decorator + * @methodOf angular.module.AUTO.$provide + * @description + * + * Decoration of service, allows the decorator to intercept the service instance creation. The + * returned instance may be the original instance, or a new instance which delegates to the + * original instance. + * + * @param {string} name The name of the service to decorate. + * @param {function()} decorator This function will be invoked when the service needs to be + * instanciated. The function is called using the {@link angular.module.AUTO.$injector#invoke + * injector.invoke} method and is therefore fully injectable. Local injection arguments: + * + * * `$delegate` - The original service instance, which can be monkey patched, configured, + * decorated or delegated to. + */ + + function createInjector(modulesToLoad) { var providerSuffix = 'Provider', path = [],