ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Feature request: Ionic 2 (dev/prod) environment variables configuration

Open jgw96 opened this issue 10 years ago • 121 comments

From @amreladawy on July 24, 2016 6:58

Short description of the problem:

It is a feature request. Just like Angular2, I hope that Ionic can provide 2 files (environment.dev.ts and environment.prod.ts) that would contain variables with different values corresponding to production and development environment. During the build, the appropriate file to be copied and bundled within the app artifact.

Which Ionic Version? 2.x

https://forum.ionicframework.com/t/ionic-2-environment-variables-config-setup/58147/1

https://stackoverflow.com/questions/36004810/how-to-config-different-development-environment-in-angular-2-app

Copied from original issue: driftyco/ionic#7413

jgw96 avatar Jul 25 '16 20:07 jgw96

For anyone who is still stuck on this; I simply needed to have different configurations for different environments. Check the following gist for my implementation: https://gist.github.com/md-hamed/9212a32b37e72b1f8fd51136b1e1dfdc

md-hamed avatar Dec 13 '18 16:12 md-hamed