title: Response isn't working in Angular 4
body: <p>I have a service to connect to my backend. But I have this problem:</p>
  
  <p>The error:</p>
  
  <p>ERROR in src/app/login/sevices/login.service.ts(18,14): error TS2345: Argument of type '(res: Response) => Promise' is not assignable to parameter of type '(value: Response, index: number) => Promise'.
    Types of parameters 'res' and 'value' are incompatible.
      Type 'Response' is not assignable to type 'Response'. Two different types with this name exist, but they are unrelated.
        Property 'body' is missing in type 'Response'.</p>
  
  <hr>
  
  <p>login.service.ts:</p>
  
  <pre><code>import {Injectable} from "@angular/core";
  import { Http } from '@angular/http';
  import { Observable } from 'rxjs/Observable';
  import { Login } from'../data-login/models/login.model';
  import 'rxjs/add/operator/catch';
  
  @Injectable()
  export class LoginService{
  
  private url = 'http://localhost:8080/login';
  
     constructor(private http: Http){}
  
     loginQuery(login: Login){
        return this.http.post(this.url,JSON.stringify(login))
         .map((res:Response) =&gt; res.json())
         .catch((error:any) =&gt; Observable.throw(error.json().error || 'Server error'));
     }
  }
  </code></pre>
  
  <p>My Component:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { Router } from '@angular/router';
  
  import { LoginService } from '../sevices/login.service';
  import { Login } from './models/login.model';
  import {NgForm} from "@angular/forms";
  import {AuthService} from "../../auth.service";
  
  @Component({
      selector: 'data-login-component',
      templateUrl: './data-login.component.html',
      styleUrls: ['./data-login.component.css']
  })
  export class DataLoginComponent implements OnInit {
    cssClass: string;
    login: Boolean = false;
  
    constructor(private loginService: LoginService, private router: Router, private authService: AuthService) { }
  
    ngOnInit() {
  
    }
  
    verifyLogin(change: Boolean){
       if(change){
         console.log('OK');
         this.authService.login();
         this.router.navigate(['home-aluno']);
       }else{
         console.log('ERROR');
       }
    }
  
    onSingin(form: NgForm){
       if( (form.value.code !== '') &amp;&amp; (form.value.password !== '')){
  
          this.loginService.loginQuery(new Login(form.value.code, form.value.password))
           .subscribe(
              result =&gt; this.verifyLogin(result)
           );
       }
    }
  
  }
  </code></pre>
  
  <p>My backend working fine. Where is my problem?</p>