• Overview
@angular/upgrade/static

downgradeInjectable

function

A helper function to allow an Angular service to be accessible from AngularJS.

  
    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.

@paramtokenany

an InjectionToken that identifies a service provided from Angular.

@paramdowngradedModulestring

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.)

@returnsFunction
Jump to details