0

I am trying to get the values of dynamically added component on click of save button.

Here is get-dynamic-added-component-values

ts:

postData: any[]=[];
  finalObject;
  saveData(form : NgForm) {
    this.postData = form.value;
    let jsonData = this.postData; <-- I am not getting all values
  }

Here I will get values which is default added, when I click on Append to tab button, new component will be added and on click of save button all values will be printed in ts file (saveData()) function.

Pathik Vejani
  • 4,263
  • 8
  • 57
  • 98

1 Answers1

0

I could see only configselectedLinkTo-1 value is undefined that's because it's type is hidden

<input type="hidden" [(ngModel)]="selectedLinkTo1" name="configselectedLinkTo-1" />
Ininiv
  • 1,325
  • 7
  • 12