Storing environment variables in Angular 2
<p>I am currently developing an application for Angular 2 based on <a href="https://github.com/mgechev/angular2-seed" rel="nofollow">angular2-seed</a>. I am looking what the best way is to store enviroment variables so I can store different values for, for example, a API url.</p>

<p>The default config file (<strong>seed.config.ts</strong>) already has 2 environments that are used when building for production or development: </p>

<pre><code>/**
 * The enumeration of available environments.
 * @type {Environments}
 */
export const ENVIRONMENTS: Environments = {
  DEVELOPMENT: 'dev',
  PRODUCTION: 'prod',
  STAGING: 'staging'
};
</code></pre>

<p>Further in this config file, a class SeedConfig is defined that has some constants defined, I guess this would be the place where I should add my variables as wel. That gives me:</p>

<pre><code>export class SeedConfig {

  PORT = argv['port'] || 8000;
  URL_DEV = 'www.example.com';
  URL_PROD = 'www.example.com';
</code></pre>

<p>Now what would be the best approach to access these variables in my template, based on the configured environment?</p>