我正在为我的大学项目构建一个演示电子商务Web应用程序。 坚果我在代码中说了这个特定的错误
ERROR in src/app/user/product/product.component.ts(57,11): error TS2740: Type 'any[]' is missing the following properties from type 'Observable<any>': _isScalar, source, operator, lift, and 5 more.
这是我得到错误的地方
getData() {
this.dataLoading = true;
this.querySubscription = this._backendService.getProducts('Products')
.subscribe(members => {
this.members = members;
this.dataLoading = false;
},
(error) => {
this.error = true;
this.errorMessage = error.message;
this.dataLoading = false;
},
() => {
this.error = false;
this.dataLoading = false;
});
}
VS Code指向此行
this.members = members;
我还创建了Observable
members: Observable<any>;
该如何解决?请帮忙!