Property 'toPromise' does not exist on type 'Observable<Response>'

You need to add the operator like this:

import 'rxjs/add/operator/toPromise';

This is needed for every rxjs operator you want to use.


Try adding 'Response' to your import statement from '@angular/http' like this :

import {Http, Headers, Response} from '@angular/http';

Also i noticed you don't import Ingectable from angular core although you use @Injectable decorator.

import { Injectable } from '@angular/core';

use this import at the beginning

import {Observable} from "rxjs/Rx";