title: Angular 2 : No provider for ConnectionBackend
body: <p>Get this "No provider for ConnectionBackend!" error when trying to use <code>http</code> with a promise. </p>
  
  <h3>main.ts</h3>
  
  <pre><code>// ... tl;dr import a bunch of stuff
  
  platformBrowserDynamic().bootstrapModule(MyModule);
  </code></pre>
  
  <h3>myModule.ts</h3>
  
  <pre><code>// ... tl;dr import a bunch of stuff
  
  @NgModule({
   declarations: [
          PostComponent
    ],
    providers: [
      Actions,
      MyService,
      Http
    ],
    imports: [
      ...
    ],
    bootstrap: [MyComponent]
  })
  </code></pre>
  
  <h3>myComponent.ts</h3>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import {ActivatedRoute, Router} from '@angular/router';
  import {Observable} from 'rxjs/Observable';
  import {MyService} from './../services/myService'
  import {Post} from './post';
  
  @Component({
    templateUrl: 'post.component.html',
    styleUrls: ['post.component.css']
  })
  export class MyComponent implements OnInit {
    post: Observable&lt;Post&gt;;
    postId : Number;
  
    constructor(private route: ActivatedRoute, private router: Router, private service:MyService) {
  
    }
  
  
    ngOnInit() {
      this.route.params.subscribe(params =&gt; {
        this.postId = +params['id'];
        this.post = this.service.getPostById(this.postId);
      });
    }
  
  }
  </code></pre>
  
  <h3>myService.ts</h3>
  
  <pre><code>import {Injectable} from "@angular/core"
  import {Http} from '@angular/http';
  import {Observable} from 'rxjs/Observable';
  import {Post} from './../post/post';
  import 'rxjs/Rx'
  
  @Injectable()
  export class MyService {
  
      endpoint_url:String = "http://someurl.com/";
  
      constructor(private http: Http){
      }
  
      getPostById (id:Number) : Observable&lt;Post&gt; {
          return this.http.get(this.endpoint_url + id.toString()).map(res =&gt; res.json());
      }
  }
  </code></pre>
  
  <p>All looks good but then I get this error:</p>
  
  <pre><code>error_handler.js:51Error: Uncaught (in promise): Error: Error in ./MyComponent class MyComponent_Host - inline template:0:0 caused by: No provider for ConnectionBackend!
  at resolvePromise (zone.js:429)
  at zone.js:406
  ...
  </code></pre>
  
  <p>And <a href="https://angular.io/docs/ts/latest/api/http/index/ConnectionBackend-class.html" rel="noreferrer">here is the docs for ConnectionBackend</a>.  I think I just need to add something to <code>providers</code> in <code>myModule</code>?</p>