How to handle multiple environments in Angular framework

Dev Ajay Tiwari
Nov 10, 2020

Step 1. find root project file =: angular.json

Step 2. section configuration add object :

“production”: { “fileReplacements”: [

Step 3: Create environment.prod.ts file >> src/environments folder

Step 4: Add content environment.prod.ts :

export const environment = { production: true, environmentName: ‘prod’, serviceUrl: “http://api.prod.com"};

Step 5 : command : ng build — configuration=production

--

--