您的位置:首页 > 运维架构

Property 'map' does not exist on type 'Observable'报错解决方案

2018-12-16 17:47 453 查看

开发项目时Property ‘map’ does not exist on type 'Observable’报错

constructor(private http: Http) {
this.dataSource = this.http.get('/list')
.map((res) => res.json());
}


分析之后发现是缺少模块,安装此模块即可解决。

npm install rxjs-compat
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐