我收到错误
TypeError:无法读取未定义的属性“ subscribe”
this.subscription=this.MyService.List().
subscribe(data =>
{
this.arrayTmp = data;
});
服务文件:
List(){
return this.http.get(MY JSON URL)
.pipe(map(res => {
return res;
}));
}