title: Angular2 - TypeError: this.http.get(...).toPromise is not a function
body: <p>i try to follow tutorial on angular.io (<a href="https://angular.io/docs/ts/latest/tutorial/toh-pt6.html" rel="noreferrer">Tour the Heroes</a>)
  But instead of tutorial I try to make real GET request on some JSON.</p>
  
  <p>My code looks like:</p>
  
  <pre><code>  private userUrl = 'https://jsonplaceholder.typicode.com/users';
    constructor(private http: Http) {}
  
    getUsersHttp(): Promise&lt;User[]&gt; {
      return this.http.get(this.userUrl)
        .toPromise()
        .then(response =&gt; response.json().data as User[])
        .catch(this.handleError);
    }
  </code></pre>
  
  <p>To service I import just few basic things:</p>
  
  <pre><code>import { Injectable }     from '@angular/core';
  import { Headers, Http, Response } from '@angular/http';
  import { User } from './user';
  </code></pre>
  
  <p>Where <code>user.ts</code> is basicly copy of <code>heroe.ts</code> in TOH so:</p>
  
  <pre><code>export class User {
    id: number;
    name: string;
  }
  </code></pre>
  
  <p>How I call this specific method in service:
  First I try multiple things but while debugging i try just console.log it so:</p>
  
  <pre><code> console.log(this.userService.getUsersHttp());
  </code></pre>
  
  <p>When page is loading in console i found multiple errors:
  First one is:</p>
  
  <blockquote>
    <p>EXCEPTION: TypeError: this.http.get(...).toPromise is not a function</p>
  </blockquote>
  
  <p>Second one is:</p>
  
  <blockquote>
    <p>EXCEPTION: TypeError: this.http.get(...).toPromise is not a
    functionBrowserDomAdapter.logError @</p>
  </blockquote>
  
  <p>Service it self looks fine. I added my service to <code>app.module.ts</code> in this line:</p>
  
  <pre><code>providers: [ HTTP_PROVIDERS, UserService ]
  </code></pre>
  
  <p>and it works if I directly return data with some function like (and comment out calling <code>getUsertHttp</code> function):</p>
  
  <pre><code>  getUsers() {
      return [{'id': 1, 'name': 'User1'}, {'id': 2, 'name': 'User2'}];
    }
  </code></pre>
  
  <p>I try to describe everything which may be important so sorry if question is kind long a bit. 
  <strong>Please guys can you give me hint what i am doing wrong?</strong></p>