import { Injectable } from '@angular/core';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { Observable } from 'rxjs';
import { User } from './user';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';


@Injectable()
export class UserService{
   
   constructor(private _httpService: Http){}
    getAllUsers(): Observable<User[]>{
       return this._httpService.get("http://localhost:7777/webapp/user";)
               .map((response: Response) => response.json())
               .catch(this.handleError);
   }

    private handleError(error: Response){
       return Observable.throw(error);
   }

}

Error: Property 'map' does not exist on type 'Observable<Response>'.ts(2339)

Angular CLI: 9.0.4
Node: 12.16.1
OS: win32 x64

Angular: 9.0.4

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/fcd445cb-0e93-4c1e-81da-43f418d38dac%40googlegroups.com.

Reply via email to