mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-21 08:50:24 +00:00
docs(decorator): add missing decorate docs
This commit is contained in:
parent
85b2084f57
commit
cae9ad4ba9
1 changed files with 20 additions and 0 deletions
|
|
@ -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 = [],
|
||||
|
|
|
|||
Loading…
Reference in a new issue