title: Angular 2: is not a function but it exist
body: <p>I am trying to get an array out of a different class but he says the function does not exist.
  here is my code:</p>
  
  <p><strong>courses.component.ts</strong>:</p>
  
  <pre><code>import {Component} from 'angular2/core'
  import {CourseService} from './course.service'
  
  @Component({
      selector: 'courses',
      template: `
          &lt;h2&gt;Courses&lt;/h2&gt;
          {{ title }}
          &lt;ul&gt;
              &lt;li *ngFor ="#course of courses"&gt;
              {{course}}
              &lt;/li&gt;
          &lt;/ul&gt;
          `,
      providers: [CourseService]
  })
  export class CoursesComponent{
      title = "The title of courses page";
      courses;
  
      constructor(courseService: CourseService){
          this.courses = CourseService.getCourses();
      }
  }
  </code></pre>
  
  <p><strong>course.service.ts</strong>:</p>
  
  <pre><code>export class CourseService{
      getCourses() : string[]{
          return ["Course1","Course2","Course3"];
      }
  }
  </code></pre>