Access environment variables in production build Angular 4
问题 I want to deploy a production build of angular app with a configurable api url for the user to test it out. I use the environment.ts but after the production build, I do not know how to configure the variables. What approach needs to be done? 回答1: Are you using Angular-CLI? It should be easy, then. You have something like this: src/ app/ environment/ environment.ts environment.prod.ts Simply put different url in environment.prod.ts and your prod build gets a second url. E.g. let's say your