You can define different environment files. Below example for "dev":
export const environment = { production: false, envName: 'dev', configPath: './assets/config/config.dev.json' ... }; Add a configuration part for "dev" in "angular.json" file, like that:
"dev": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.dev.ts" } ], .... And useruse this command to build : ng build --configuration=dev Take
For more information, take a look at this post : How to set environment via `ng serve` in Angular 6