Pass the generated ID Response Angular

Viewed 50

I want to pass the generated response id of this.fg.value?.info to the this.fg.value.SetItem but when i did this i got an error? anyone can help?

saveButton() {
  console.log(this.fg.value);
  this.microSvc.Post(this.fg.value).subscribe((respo) => {
    this.headerID = respo.id;
    for (const item of this.fg.value?.Info) {
      item.id = this.headerID;
      this.microSvc.Post1(item).subscribe((response) => {
        for (const serial this.fg.value?.SetItem) {
          item.ItemId = this.detailsID;
          this.microSvc.testing(serial).subscribe((res) => {});
        }
      });
    }
  });
}
0 Answers
Related