@@ -347,18 +347,20 @@ function annotate(fn, strictDi, name) {
347
347
* these cases the {@link auto.$provide $provide} service has additional helper methods to register
348
348
* services without specifying a provider.
349
349
*
350
- * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the
350
+ * * {@link auto.$provide#provider provider(name, provider)} - registers a **service provider** with the
351
351
* {@link auto.$injector $injector}
352
- * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by
352
+ * * {@link auto.$provide#constant constant(name, obj)} - registers a value/object that can be accessed by
353
353
* providers and services.
354
- * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by
354
+ * * {@link auto.$provide#value value(name, obj)} - registers a value/object that can only be accessed by
355
355
* services, not providers.
356
- * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,
356
+ * * {@link auto.$provide#factory factory(name, fn)} - registers a service **factory function**
357
357
* that will be wrapped in a **service provider** object, whose `$get` property will contain the
358
358
* given factory function.
359
- * * {@link auto.$provide#service service(class )} - registers a **constructor function**, `class`
359
+ * * {@link auto.$provide#service service(name, Fn )} - registers a **constructor function**
360
360
* that will be wrapped in a **service provider** object, whose `$get` property will instantiate
361
361
* a new object using the given constructor function.
362
+ * * {@link auto.$provide#decorator decorator(name, decorFn)} - registers a **decorator function** that
363
+ * will be able to modify or replace the implementation of another service.
362
364
*
363
365
* See the individual methods for more information and examples.
364
366
*/
@@ -615,18 +617,20 @@ function annotate(fn, strictDi, name) {
615
617
* @name $provide#decorator
616
618
* @description
617
619
*
618
- * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator
620
+ * Register a **decorator function ** with the {@link auto.$injector $injector}. A decorator function
619
621
* intercepts the creation of a service, allowing it to override or modify the behavior of the
620
- * service. The object returned by the decorator may be the original service, or a new service
621
- * object which replaces or wraps and delegates to the original service.
622
+ * service. The return value of the decorator function may be the original service, or a new service
623
+ * that replaces (or wraps and delegates to) the original service.
624
+ *
625
+ * You can find out more about using decorators in the {@link guide/decorators} guide.
622
626
*
623
627
* @param {string } name The name of the service to decorate.
624
628
* @param {Function|Array.<string|Function> } decorator This function will be invoked when the service needs to be
625
- * instantiated and should return the decorated service instance. The function is called using
629
+ * provided and should return the decorated service instance. The function is called using
626
630
* the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.
627
631
* Local injection arguments:
628
632
*
629
- * * `$delegate` - The original service instance, which can be monkey patched, configured,
633
+ * * `$delegate` - The original service instance, which can be replaced, monkey patched, configured,
630
634
* decorated or delegated to.
631
635
*
632
636
* @example
0 commit comments