Reputation: 1958
I have an Array. I need to send the form data as object along with form submit. check the below Code https://stackblitz.com/edit/angular-r9astq?file=src%2Fapp%2Fapp.component.ts
Upvotes: 0
Views: 327
Reputation: 1958
I have find out some solution with working solution. Go through the following solution.
https://stackblitz.com/edit/angular-2tmrqr?file=src%2Fapp%2Fapp.component.html
Upvotes: 0
Reputation: 881
you can use angular reactive forms and use form array for the same to implement dynamic form. I am adding the link for angular documentation :
Angular Reactive Forms - https://angular.io/guide/reactive-forms
Form Array - https://angular.io/api/forms/FormArray
Upvotes: 1