Angular 无法找到';地图';在角6服务

Angular 无法找到';地图';在角6服务,angular,asp.net-web-api2,Angular,Asp.net Web Api2,我创建了一个angular服务,并尝试进行web API调用。但是在“getItems”函数中的“map”属性中获取错误。Angular找不到此属性 我还尝试导入map函数,但没有任何效果 import { Injectable } from '@angular/core'; import { Http, Response, Headers, RequestOptions, RequestMethod } from '@angular/http'; //import { Observable }

我创建了一个angular服务,并尝试进行web API调用。但是在“getItems”函数中的“map”属性中获取错误。Angular找不到此属性

我还尝试导入map函数,但没有任何效果

import { Injectable } from '@angular/core';
import { Http, Response, Headers, RequestOptions, RequestMethod } from '@angular/http';
//import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/toPromise';

import {Employee} from'./employee.model'

@Injectable()
export class EmployeeService {
  selectedEmployee : Employee;
  employeeList : Employee[];
  constructor(private http : Http) { }

  getItems() {
    this.http.get('http://localhost:28750/api/Employee').pipe(map(data => {})).subscribe(result => {
      console.log(result);
    });
  }
}
从“rxjs 5.5+”导入“地图”,如下所示:

import { map } from 'rxjs/operators';
从“rxjs 5.5+”导入“地图”,如下所示:

import { map } from 'rxjs/operators';

从'rxjs/operators'导入{map}
从“rxjs/operators”导入{map}