九、Rxjs请求对Observable进行封装

1.引入 Http、Jsonp、Rxjs 三个模块

 

2.请求中添加一个 .map(res => res.json)

问题

1.Property 'map' does not exist on type 'Observable<Response>'

解决问题:执行命令 npm install rxjs-compat 

 

猜你喜欢

转载自www.cnblogs.com/jtfr/p/10555071.html