关于rxjs
来源:5-3 常见操作符(二)
 
			alien_chen
2018-05-26
代码为:
Observable.prototype.debug = function(message: string) {
return this.do(
(next) => {
if (!environment.production) {
console.log(message, next);
}
},
(err) => {
if (!environment.production) {
console.error('ERROR>>>', message, err);
}
},
() => {
if (!environment.production) {
console.log('Completed - ');
}
}
);
但是这个时候报了 this.do is no a function ; this.do 一直为undefined
写回答
	3回答
- 
				  接灰的电子产品 2019-06-12 安装兼容包 npm i -S rxjs-compat 012019-06-14
- 
				  alien_chen 提问者 2018-05-26 是rxjs 5 , 刚刚去看了api 没有do这个操作符了 022019-06-12
- 
				  接灰的电子产品 2018-05-26 你不会安装了 rxjs 6 了吧 012019-06-12
Angular打造企业级协作平台,让你在Angular领域中出类拔萃
				全网首个介绍官方 Material 组件库用法与 Redux 在 Angular 中的应用
			
			
		998 学习 · 536 问题
相似问题
