don't name the form group with same name of variable of ng for change it and it will be work but define the new name as a form group in TS file cause the restrict mood
Can you help us to know if I want to update the value of formArray , how would I implement that??I followed your code for add and remove. Looking forward for a reply.
what if i do not want to have add button to trigger the creation for form controls..What if I want to generate the formArray via an array from API? like pplArr = ['person1', 'person2, 'person3']. I want two text fields created for each person if the array length of pplArr is greater than zero.Does anyone have an ideal? I would not be using a click button. So how do i push to the lessons formArray?
perfect thank u so much sir
Most welcome
Loved it. Thank!
FINALLYYYY!!!!! Thanks a ton!!!
[formGroup]="lessonForm" inside the formarray not working
don't name the form group with same name of variable of ng for
change it and it will be work but define the new name as a form group in TS file cause the restrict mood
I passed the index as i into the ngFor loop and used [formGroupName]="I">
Can you help us to know if I want to update the value of formArray , how would I implement that??I followed your code for add and remove. Looking forward for a reply.
do you find the way to do update plz??
@@ahohm Hey, did you found out how to solve it?
excellent
you're the best
Can you help me to update some value which is already in array and also adding a new field in the same component.
Hey, did you found out how to solve it?
@@artreal5440 i think we will use setValue() and getRowValue() i will try it and back to you
You get the reference to the row, from there u access the form group by position on the formArray and then u upload the form control that you need
what if i do not want to have add button to trigger the creation for form controls..What if I want to generate the formArray via an array from API? like pplArr = ['person1', 'person2, 'person3']. I want two text fields created for each person if the array length of pplArr is greater than zero.Does anyone have an ideal? I would not be using a click button. So how do i push to the lessons formArray?
with a foreach you can call the function add for n values onthe array
Use rxjs map operator
can you send css file please?