Angular Providers

How to Create Runtime Configuration file in Angular
Angular

Angular Runtime Configuration

The most apps need some sort of Runtime configuration information, which it needs to load at startup. For example, if your app requires data, then it needs to know the base location of your REST endpoints. This endpoints are not fixed and may have different values for development, testing & production.

How to use APP_INITIALIZER Angular
Angular

Angular How to use APP_INITIALIZER

The APP_INITIALIZER is an instance of InjectionToken. It is a built in Injection token provided by Angular. The Angular will execute the function provided by this token when the application loads. If the function returns the promise, then the angular will wait until the promise is resolved. This will make it ideal place to perform some initialization logic before the application is initialized.

Scroll to Top