Adding Environments:

Create a new file called environment.qa.ts in the /environment folder with the following contents:

export const environment = {  
  production: false,
  envName: 'qa'
};

Add the qa entry to the .angular.cli.json config:

 "environments": {
    "dev": "environments/environment.ts",
    "prod": "environments/environment.prod.ts",
    "qa": "environments/environment.qa.ts"
  }

Now the new environment is ready to use.

#build
$ ng build --environment=production
$ ng build --environment=qa
#shorthand
$ ng b -prod
$ ng b -qa

#serve
$ ng serve --environment=production
$ ng serve --environment=qa
#shorthand
$ ng s -prod
$ ng s -qa

Reference: http://tattoocoder.com/angular-cli-using-the-environment-option/