I am uning angular-cli for my angular2 project.
I am calling backend ajax services through my angular2 service.
I have different services end point (URL) for different task. I want to make those services environment sensetive.
Suppose I have two service
- Customer Service :
https://localhost:8080/customers - Product Service :
https://localhost:8080/products
Since localhost is avaliable in my development environment. It is working
Now suppose x.x.x.x is my production web service host ip address.
So for production environment the service URL will be https://x.x.x.x:8080/customers
Please help me how to achive this.
I found there is a block in angular-cli.json file as
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
But I did now found that environments directory.
How to create that and manage environment specific end points?