Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

EnvironmentProviders

Encapsulated Providers that are only accepted during creation of an EnvironmentInjector (e.g. in an NgModule).

See more...

      
      type EnvironmentProviders = {
    ɵbrand: 'EnvironmentProviders';
};
    

See also

Description

Using this wrapper type prevents providers which are only designed to work in application/environment injectors from being accidentally included in @Component.providers and ending up in a component injector.

This wrapper type prevents access to the Providers inside.