title: How to fire an ajax request in Angular 2?
body: <p>I have service defined in Angular 2 like this:</p>
  
  <pre><code>import { Inject } from 'angular2/angular2';
  import { Http ,Headers , HTTP_PROVIDERS } from 'angular2/http';
  
  export interface CourseInterface {
      courseId: number,
      coursePrice: number,
      authorName: string
  }
  
  export class CourseDetailsService {
      http: Http;
      constructor(@Inject(Http) Http) {
          console.log(Http)
          this.http = Http;
      }
  
      load() {
          console.log("came here in service")
          var headers = new Headers();
          headers.append('Authorization', &lt;my username password&gt;);
  
          this.http.get('https://some.api',{
              headers : headers
          }).map(res =&gt; console.log("Response came!!!"))
  
          console.log("done . . .")
      }
  }
  </code></pre>
  
  <p>and in another component, I use this service like this:</p>
  
  <pre><code>import {CourseInterface, CourseDetailsService} from '../services/course';
  
  @Component({
      selector: 'dashboard',
      viewBindings: [CourseDetailsService]
  })
  @View({
      template: `
          &lt;h1&gt;Dashboard page laoded&lt;/h1&gt;
    `
  })
  export class Dashboard {
      constructor(service: CourseDetailsService) {
          service.load();
      }
  }
  </code></pre>
  
  <p>and while running the application, I can see my <code>Dashboard</code> component gets displayed on the screen. But however from the <code>CourseDetailsService</code>, no http calls are getting fired. </p>
  
  <p>But in the console I could able to see the following printed:</p>
  
  <pre><code>came here in service
  done . . . . 
  </code></pre>
  
  <p>But in my chrome networks tab, I couldn't able to see any request fired to the specified url. Where I am making mistake?</p>
  
  <p>I'm using Angular 2 Alpha 47</p>