Я звоню в сервисный бэкэнд, но он выполняет вызов 2 или 3 раза, я не знаю почему, ниже я делюсь своим экраном и кодом.
Это мой сервисный код.
public getClaimDataParam (data:string) {
let data1={
"userid": this.userId,
"status": data
}
return this.http.post(this.Api_urls[this.localStorage.get('app_mode')+''].newclaimUrl,data1).map((resp)=>{
return resp;
},(error)=>{
this.spinner.hide()
alert("Network Error")
});
}
Это мой код component.ts
getClaimList (data) {
this.loading = true;
this.spinnerService.show()
this.batchService.getClaimDataParam(data).subscribe((resp)=>{
this.spinnerService.hide()
this.claimsData = resp;
this.loading = false;
this.tempClaimData = this.claimsData;
Это мой снимок экрана консоли (см. getallclaims )
