title: Create class or interface with default values to access from everywhere in typescript
body: <p>i need to make a class in typescript with default values because i need to access this values from all my app but i dont want to copy and paste the value in every component i need to use it.</p>
  
  <p>this is my class code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>export class WeightScale {
      idIos: string
      idAndroid: string
      name: string 
  
      constructor(idIos: string = '123456ABC',
                  idAndroid: string = 'ABC:321:3567',
                  name: string = 'Device1')
      {
  
          this.idIos = idIos;
          this.idAndroid = idAndroid;
          this.name = name;
      }
       
  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>but when i try to access to the class id value i get this error:</p>
  
  <p>HomePage_Host.ngfactory.js? [sm]:1 ERROR TypeError: Cannot read property 'idAndroid' of undefined</p>