holydragon
holydragon

Reputation: 6728

How to configure environment variables for ionic v1 build?

I am working on a project that uses Ionic v1. Right now when I am developing on my local computer, I connect to my local web-service but when the application is built with

cordova build android --release

in order to build to Android app. The step I need to do is to always replace the URL from my local web-service to the production web-service.

When the Angular 7 released, I had a chance to try it, and as a result, I love it so much especially the environment variables part where you can configure the variables according to the environment you are using or serving to.

Here comes the question.

Is there an environment variables system like what I just mentioned in Ionic v1? If it has then please guide me the way. If not then please help me get a workaround for this problem.

Upvotes: 1

Views: 425

Answers (1)

holydragon
holydragon

Reputation: 6728

I got myself an answer to solve this question. For anyone who is facing this issue, you need to see this.

Upvotes: 1

Related Questions