Angular 2 Model-Driven form.reset () does not reset the FormArray property

I have a model with angular 2 that has a property of type FormArray . When I call the myForm.reset(this._originalValue) method, the number of elements in the FormArray not equal to reset to the original value.

Here is the plunker showing the problem: https://plnkr.co/edit/gRHD5Ikbm1aGzFQUF2nn?p=preview

Is there a way to force the myForm.reset() reset method to count the number of elements in properties of type FormArray ? Or do I need to manually reset it?

+8
angular angular2-forms
source share
1 answer

Well, it seems like this is a known issue, and the Angular team decided that this would require manually resetting the size of the FormArray.

https://github.com/angular/angular/issues/10960

+5
source share

All Articles