How to effectively manage your environment variables in Angular / Ionic applications with different scenarios ( Testing, preproduction, production.. )

If you are reading this article, you maybe want to manage your environment well, especially if you are using multiple environments like development, testing, pre-production, production, demo .. and to do that there is the famous environment.ts file inside src/environment folder of your Angular / Ionic project.
By default in an Angular project, you’ll have two files, one for the development environment and the other for production. BUT, .. what if you need to add other environments? What if a developer edited the production file by mistake? …

Adnane Lamghari

Software engineer | FullStack developer | MEAN Stack lover

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store