importProvidersFrom
function
Collects providers from all NgModules and standalone components, including transitively imported ones.
API
Description
Usage Notes
function importProvidersFrom( ...sources: ImportProvidersSource[]): EnvironmentProviders;
importProvidersFrom
Collects providers from all NgModules and standalone components, including transitively imported ones.
Providers extracted via importProvidersFrom
are only usable in an application injector or
another environment injector (such as a route injector). They should not be used in component
providers.
More information about standalone components can be found in this guide.
@returns
EnvironmentProviders
Jump to details