Skip to main content

Dependency Injection

This Class contain the helpers to add on the dynamically Dependency Injection Providers which will be used globally by all the components.

Constructor
DependencyInjection()#

Properties#

publicStatic
Container
:InversifyContainer
#

This is the implementation of a global inversify container that helps to contain every Dependency Injection.

Methods#

publicStatic
setProvider(
ProviderFactory
:ProviderFactory
providerNameOptional
:String| Symbol | never
)#

This assign to the global inversify container Express Tea can set provider as user required to the global container and shareable to all registered modules. This method used if required to assign a provider depending on params or data flow.

Parameters
NameOptionalTypeDefaultsDescription
ProviderFactoryNoProviderFactoryAssign Provider Class decorated by inversify.
providerNameYesString| Symbol | neverProvide Identification.