What is Form Array | Reactive Forms | Angular 13+
Вставка
- Опубліковано 3 лип 2024
- In this lecture, you are going to learn about form arrays in Angular forms. A form array is a collection of Form controls grouped together. The Form control can be of type FormControl, FormGroup or another FormArray.
We have learned that we can also group form controls together using FormGroup. Then what is the difference between a FormGroup & FormArray? When we use FormGroup, the controls which we group together becomes a property of an object i.e. the FormGroup object.
but when we use FormArray, the controls are the elements of FormArray and not a property of it. Let's learn about FormArray in detail in this lecture.
Thank you very much for these Angular tutorials. Very detailed and precise information that helped me to understand how Angular works. We can learn much from you. Keep up the good work!
Totally agree with you @mateon
To the point😊 thanks a lot
Excellent
Hi,
Can we use FormArray to create a row with more than one data type, basically a row with more than one column and two or more data types
whenever we are clicking the add skills btn the formGroup is firing will this effect the angular app as changedetection taking place unnecessarily??
If i was to console log the form array values then would it be shown as an array? I would like to use something like this where I add multiple skills but in my case i need to pass the data as a flat structure....
Sir,
Can we log all form controls values & multiple form array values can we store them in one variable?
why do we need to use ng-container outside the input for adding skill?
Awesome
there is an error 6:30 says object might be null..... how can i fix it
please answer me,
i did just like you at 6:08 and got error
=> Property 'controls' does not exist on type 'AbstractControl'.
i used getter function to avoid the error but why that happened
Can you share that line of code here??
i did as directed in video and faced no issues
I have same error always and chatgpt not helping me :(
Hello sir, thank you for your tutorials, could you please make a tutorials for Form Builder and is it different from Form Array
I will create video's on the same. Thank you for suggestion :)
my concern is how do i submit the dynamic form values to the single skill form control it was generated from?
code pls