title: Using injectable token for handling global constants Angular 4
body: <p>we are building new Angular 4 project and trying to understand what approach will be the best for handling global constants which will be reused through all project.</p>
  
  <p>I want to place all constants inside shared folder like so</p>
  
  <p>shared</p>
  
  <pre><code>  --constants
      --dateTime.ts
      --money.ts
      --dialogConfig.ts
  </code></pre>
  
  <p>and use injectable token for each file </p>
  
  <p><a href="https://blog.thoughtram.io/angular/2016/05/23/opaque-tokens-in-angular-2.html" rel="noreferrer">https://blog.thoughtram.io/angular/2016/05/23/opaque-tokens-in-angular-2.html</a></p>
  
  <p>for example dialogConfig.ts will be</p>
  
  <pre><code>export let DIALOG = new InjectionToken&lt;DialogConfig&gt;('dialog-config');
  
  export const DIALOG_CONFIG: DialogConfig = {
   width : '600px',
   height : 'auto'
  };
  </code></pre>
  
  <p>So that each constant object will be saved from name collision and will be injectable. </p>
  
  <p>What will be proc and cons for this approach?</p>