I have a component with two main parts: a list, where the user can click to select an element, and a html form used for editing properties of the selected element. The problem is that if I choose an element and then another element with the same properties, and then edit a property's value (of the second element now displayed in the form) to the value of the same property of the first element, the form is not dirty and I cannot submit it. Similarly, by changing the selected element, I can fool the form to think it is dirty even when it should not be.
I need to reset the form's dirty status each time an element is selected, but NgForm does not seem to have any API for that. Well, it has reset(), but I would need a method for "set the current state of the controls as pristine". How to do this properly? (I have considered to reinstantiate the form by replacing it with a new one, but I do not know what to give the constructor as arguments.) -- You received this message because you are subscribed to the Google Groups "angular-dart" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular-dart+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/angular-dart. To view this discussion on the web visit https://groups.google.com/d/msgid/angular-dart/27770d10-571a-45da-8b4e-28e36727a9a9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.