我有这个代码:
public ngOnInit(){
this.schemeStore.getSchemesByAffId()
.takeWhile(() => this.isAlive)
.subscribe((schemes: Scheme[]) => {
const currId = schemes[0].currency;
this.schemeFunds$ = this.fundStore
.getSchemeValorizationsByCurrency(currId);
});
}
我甚至用以下内容导入了takeWhile:
import { takeWhile } from 'rxjs/operators';
但我有这个错误信息:
ERROR TypeError: this.schemeStore.getSchemesByAffId(...).takeWhile is not a function
有人有想法吗?
1 回答
错误导入我想,试试: