aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisko Hevery2012-02-13 17:03:19 -0800
committerMisko Hevery2012-02-21 22:45:59 -0800
commitcae9ad4ba9c31dfa9e1aa2acc945dfc8242d1c72 (patch)
tree841806a1f0cd1913a04da0c21ff17607e57bd6ba
parent85b2084f578652cc0dcba46c689683fc550554fe (diff)
downloadangular.js-cae9ad4ba9c31dfa9e1aa2acc945dfc8242d1c72.tar.bz2
docs(decorator): add missing decorate docs
-rw-r--r--src/Injector.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/Injector.js b/src/Injector.js
index c1b9e69c..a9ec6e5d 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 = [],