我更新angular / cli后,出现错误:
error TS2339: Property 'map' does not exist on type 'Observable<Response>'
我尝试了所有可能的解决方案Property 'map' does not exist on type 'Observable<Response>'
但仍然存在错误 .
我更新angular / cli后,出现错误:
error TS2339: Property 'map' does not exist on type 'Observable<Response>'
我尝试了所有可能的解决方案Property 'map' does not exist on type 'Observable<Response>'
但仍然存在错误 .
2 回答
当您提供代码而不是屏幕截图时,很容易发布答案 . Anyhow ,你必须
pipe
它:记得像这样导入
map
:对于最新版本的rxjs,我们需要从终端安装npm install rxjs-compat然后声明
import'rxjs / add / operator / map';