downgradeInjectable
function
A helper function to allow an Angular service to be accessible from AngularJS.
API
Description
Usage Notes
function downgradeInjectable( token: any, downgradedModule?: string): Function;
downgradeInjectable
Function
A helper function to allow an Angular service to be accessible from AngularJS.
Part of the upgrade/static library for hybrid upgrade apps that support AOT compilation
This helper function returns a factory function that provides access to the Angular
service identified by the token
parameter.
@paramtoken
any
an InjectionToken
that identifies a service provided from Angular.
@paramdowngradedModule
string
the name of the downgraded module (if any) that the injectable
"belongs to", as returned by a call to downgradeModule()
. It is the module, whose injector will
be used for instantiating the injectable.
(This option is only necessary when using downgradeModule()
to downgrade more than one Angular
module.)
@returns
Function
Jump to details