feat(forms): add NgForm method that resets submit state (#10715)

This commit is contained in:
Kara
2016-08-11 23:27:33 -07:00
committed by vikerman
parent 00e5b7d30a
commit 97f35714f7
4 changed files with 41 additions and 2 deletions

View File

@ -181,7 +181,12 @@ export class FormGroupDirective extends ControlContainer implements Form,
return false;
}
onReset(): void { this.form.reset(); }
onReset(): void { this.resetForm(); }
resetForm(value: any = undefined): void {
this.form.reset(value);
this._submitted = false;
}
/** @internal */
_updateDomValue() {