TS implementation of ngForm directive has resetForm() method, but in Dart version looks like the only way to reset is to re-create it.
Here is the updated reference to the TS implementation: https://github.com/angular/angular/blob/master/packages/forms/src/directives/ng_form.ts
cc @kwalrath
From the docs, to reset a form:
You have to clear all of the flags imperatively [...]
How can we do that? I don't find any ngControl API for marking a control as pristine.
@cedx That feature isn't currently available (which is what this issue is about). Until this issue is resolved, and to avoid further confusion, I'll be removing that section of the docs very soon.
@chalin Thanks for the clarification.
Ping @alorenzen is this still WIP?
Yup, still WIP.
I've added the ability to mark Controls as untouched / pristine. I'm working on added the ability to update the value for a ControlGroup/ControlArray. And then all the pieces are in place to add reset() method.
Most helpful comment
Yup, still WIP.
I've added the ability to mark
Controls asuntouched/pristine. I'm working on added the ability to update the value for aControlGroup/ControlArray. And then all the pieces are in place to addreset()method.