I want to iterate through a for loop to display response data in table rows, and I need the data values in array format. Can you please guide me on how to achieve this with the code provided below?
HTML file
<div class="row">
<form *ngIf="!isError" [formGroup]="userForm" (ngSubmit)="SubmitForm()">
<!-- Inserted HTML code here -->
</form>
</div>
TS File
this.userForm = this.fb.group({
// Inserted TypeScript code here
});
// Rest of the TypeScript code is also provided
I'm adding 3 values for 3 rows based on the response received. However, after clicking the Save button, only one row's value is being displayed instead of all three as expected. The desired output should resemble the following:
criteria: Array(3)
0: {criteriaText: 'New Feedback with CU1', rating: '5', feedbackcomment:'feed 1' }
1: {criteriaText: 'New Feedback with CU2', rating: '6', feedbackcomment:'feed 2'}
2:{criteriaText: 'New Feedback with CU3', rating: '7', feedbackcomment:'feed 3'}