As we develop our angular app, we all manage our environment variable through environment.ts which is static in nature. Most of the real-world development needs environment specific environment variables. To handle this scenario using normal env.ts you need to build a specific version for every specific environment.
In case we need to switch some configuration a build and deploy is a must which involves additional works and disruptions in service even if its a little time.
In this episode, I have demonstrated how you can use Angular's APP_INITIALIZER to handle your env variable at runtime rather than build time which will make your app changes in runtime without a single deploy and also you can use feature flags to turn on and off specific features using this solution.