# Ionic 2 environment variables config setup

**URL:** <https://forum.ionicframework.com/t/ionic-2-environment-variables-config-setup/58147>\
**Category:** ionic-v3\
**Created:** [July 21, 2016, 6:57am UTC](https://forum.ionicframework.com/t/ionic-2-environment-variables-config-setup/58147 "2016-07-21T06:57:23Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![amreladawy](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@amreladawy](https://forum.ionicframework.com/u/amreladawy)\
**Post date:** [July 21, 2016, 6:57am UTC](https://forum.ionicframework.com/t/ionic-2-environment-variables-config-setup/58147/1 "2016-07-21T06:57:23Z")

</div>

In Angular2 under `config` folder there is a set of files named (`environment.ts`, `environment.dev.ts`, `environment.prod.ts`) used to declar variables for dev environment and production.

These variables can be referenced in the ts files or by interpolation in the templates.

For example the base url, the backend API url, and so on.

My question is, How to do that in Ionic 2?

---

_[View the full topic](https://forum.ionicframework.com/t/ionic-2-environment-variables-config-setup/58147)._
