【发布时间】:2021-12-31 19:54:30
【问题描述】:
findLoads(){
if(this.loggedInUser.userFullySetupFlag === 0 || this.loggedInUser.businessFullySetupFlag === 0){
swal(
'Incomplete Profile',
'To find loads and bid, all the details inside User Profile (My Profile) and Business Profile (My Business) must be completed.',
'error'
)
return;
}
this.shipmentService.filterLoads(this.currentLoadBoardSearch).subscribe(responseObj =>{
responseObj.searchResults = responseObj.searchResults.filter(function(value, index, arr){return value.loadNumber <= responseObj.loadNumber;});
this.filteredLoads = responseObj.searchResults;
console.log("Load Results:", responseObj);
});
this.spinner.hide();}
该项目包含许多我无法在此处显示的文件。但请帮我解决这个错误。
【问题讨论】:
-
看起来您的
responseObj.searchResults未定义。也许响应对象的结构是不同的。尝试将其记录到控制台以查看它的外观。
标签: angular typescript