title: Using static variable across components
body: <p>I have a data-store TypeScript file which has a few String arrays:</p>
  
  <pre><code>export const servicesData =
      [
          'test',
          'test',
      ];
  
  export const surgeonsData =
      [
          'test',
          'test',
      ];
  </code></pre>
  
  <p>I then have another Component of which I have multiple instantiated at a time. I want to use the data-store arrays in a static way so I can use them across all instances without reading each time.</p>
  
  <p>Here is a quick abstract of what I have now. Every booking component needs to use the array from the data-model.ts file without rereading it each time.</p>
  
  <pre><code>import { surgeonsData, servicesData } from 'app/data-models.ts'
  
  @Component({
      selector: 'booking',
      template:
          `
            &lt;div *ngFor="let s of surgeons"&gt;
              {{s}}
            &lt;/div&gt;
          `
  })
  
  
  export default class BookingComponent {
  
      surgeons = surgeonsData;
      services = servicesData;
  
      constructor() {}
  
  
  }
  </code></pre>
  
  <p>So in my above example every time a new component is made the surgeonData is saved in to the surgeon variable. I want to instead of doing this every time have only one variable that every component can access.</p>