How to register providers in environment injector in Angular

Loading

Reading Time: 5 minutes Introduction In this blog post, I describe how to register providers in environment injector in Angular. One way to create an environment injector is to use the ENVIRONMENT_INITIALIZER token. When I have several providers and they don’t have to execute any logic during bootstrap, I can use makeEnvironmentProviders to wrap an array of providers to … Read more