# Environmental Varialbes

**URL:** <https://forum.ionicframework.com/t/environmental-varialbes/125742>\
**Category:** ionic-v3\
**Created:** [March 24, 2018, 12:06pm UTC](https://forum.ionicframework.com/t/environmental-varialbes/125742 "2018-03-24T12:06:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gert255](https://avatars.discourse-cdn.com/v4/letter/g/a88e57/32.png) [@Gert255](https://forum.ionicframework.com/u/Gert255)\
**Post date:** [March 24, 2018, 12:06pm UTC](https://forum.ionicframework.com/t/environmental-varialbes/125742/1 "2018-03-24T12:06:58Z")

</div>

Hi,

I have been driving myself crazy trying to find the right solution to include IONIC\_ENV into my project. I think its absurd that the framework does not include a well tested method to change and access process.env variables within the app. Does anyone know at least a proper method for implementing a way to access and change the process.env.IONIC\_ENV and allow to access it within angular

---

<div class="post-metadata">

**Author:** ![rlouie](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rlouie/32/134973_2.png) [@rlouie](https://forum.ionicframework.com/u/rlouie)\
**Post date:** [March 24, 2018, 2:49pm UTC](https://forum.ionicframework.com/t/environmental-varialbes/125742/2 "2018-03-24T14:49:44Z")

</div>

You can access any environment variable in your code with a simple webpack tweak. I wore a tutorial about it here: [http://roblouie.com/article/296/ionic-2-environment-variables-the-best-way/](http://roblouie.com/article/296/ionic-2-environment-variables-the-best-way/)

Note that I wrote this against ionic 2, if you are on a newer version you need to replace OpaqueToken with InjectionToken, but it should otherwise work.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:43pm UTC](https://forum.ionicframework.com/t/environmental-varialbes/125742/3 "2021-07-19T21:43:57Z")

</div>

Closed on July 19, 2021, 9:43pm UTC


