The "pristine" status of a form and the modification of a FormArray included in this form

25 views
Skip to first unread message

Georges Caplande

unread,
May 11, 2018, 3:31:43 AM5/11/18
to Angular and AngularJS discussion
The "pristine" state of a form is related to the value modification of one of its elements. But adding elements in a FormArray belonging to this form does not change this state ("pristine"). Is there an attribute of the form that changes when you add / delete an element in a formArray belonging to this form?

Sander Elias

unread,
May 11, 2018, 9:53:24 AM5/11/18
to Angular and AngularJS discussion
Hi Georges,

Not that I know off. How would a form know the difference between when you are building the FormArray for the first time, or mutating it later on?
In this case, you might want to mutate the pristine state manually by using `makrAsTouched` 

Regards
Sander

Georges Caplande

unread,
May 11, 2018, 10:46:25 AM5/11/18
to Angular and AngularJS discussion
Ok. Great thanks for the solution and the explanation.

Georges
Reply all
Reply to author
Forward
0 new messages