title: Typescript/Angular 2 - Pass data from one class to another
body: <p>I am a javascript programmer trying to write typescript in angular 2 and need some help:</p>
  
  <p>I have a component, which requires data from another typescript file and then uses it, for example ( I realise this is very contrived, I want to understand how to do something like this):</p>
  
  <p>app.component.ts:</p>
  
  <pre><code>import { exampleArray } from './array';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent {
  
    constructor(){
      this.logToConsole(exampleArrary.arrayProperty);
    }
  
    logToConsole(anything:number[]) {
      console.log(anything);
    }
  }
  </code></pre>
  
  <p>array.ts:</p>
  
  <pre><code>export class exampleArray {
    arrayProperty = [1, 2, 3];
  }
  </code></pre>
  
  <p>But I am getting this error:</p>
  
  <pre><code>Module 'array' has no exported member 'exampleArray'.)
  app.component.ts (12,23): Cannot find name 'exampleArrary'.)
  </code></pre>
  
  <p>Is this the right way to approach a problem like this? Is there something I am missing? I have tried 'new'ing the class with no luck</p>