Skip to main content
added 23 characters in body
Source Link
veben
  • 22.7k
  • 15
  • 70
  • 85

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

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 user this command to build : ng build --configuration=dev Take a look at this post : How to set environment via `ng serve` in Angular 6

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 use this command to build : ng build --configuration=dev

For more information, take a look at this post : How to set environment via `ng serve` in Angular 6

Source Link
veben
  • 22.7k
  • 15
  • 70
  • 85

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 user this command to build : ng build --configuration=dev Take a look at this post : How to set environment via `ng serve` in Angular 6