If you are using webpack, you can create an environment.ts file with all environment specific data as properties in an object....
{
environment: 'dev',
baseurl: 'http://myBaseUrl'
}
create a separate file for each environment (prod, qa, etc...) with the same object and properties. import the plain environment.ts file when you need environment information....
Then in each webpack config use the NormalModuleReplacementPlugin...
new webpack.NormalModuleReplacementPlugin(/\.\/environment\./, './environment.qa.ts')
You are basically telling webpack wherever I import environment replace it with environment with environment.qa (or whichever version)