Can be used to register a middleware
which will be invoked right before adding a provider to this module.
The provided middleware callback
can either return a boolean
or a ProviderToken
object type.
Note: Returning true
can be used to pass through the middleware without modifying
the ProviderToken
object, while returning false
will reject the request of adding that specific provider.
Can be used to register a middleware
which will be invoked right before a provider is returned to the consumer from this module container.
The provided middleware callback
can return anything
.
Can be used to register a middleware
which will be invoked right before removing an ExportDefinition
from this module.
Note: The provided middleware callback
must return a boolean
where true
means that
the ExportDefinition
can be removed and false
means to keep it.
Can be used to register a middleware
which will be invoked right before removing an imported module from this module.
Note: The provided middleware callback
must return a boolean
where true
means that
the imported module can be removed and false
means to keep it.
Can be used to register a middleware
which will be invoked right before removing a provider from this module.
Note: The provided middleware callback
must return a boolean
where true
means that
the provider can be removed and false
means to keep it.
Can be used to register a middleware
which will be invoked each time
a consumer module
tries to access the ExportDefinition
list of this module to get
a provider.
Note: The provided middleware callback
will be invoked for each ProviderToken
of the ExportsDefinition
list
and must return a boolean
where true
means that the ProviderToken
is authorized to be used by the importer module.
Can be used to register a
middleware
which will be invoked right before importing amodule
into this module.The provided middleware
callback
can either return aboolean
or aProviderModule
instance.Note: Returning
true
can be used to pass through the middleware without modifying theProviderModule
instance, while returningfalse
will reject the request of importing that specific module.