In an Angular reactive form. How to reset only the state of form after successful submit?
Here is the process:
04-06-2020: Ionic 5+ and Angular 9+
Just a single line. i.e. this.form.reset();
Resets the FormGroup, marks all descendants are marked pristine and untouched, and the value of all descendants to null.
form: FormGroup;
constructor(private formBuilder: FormBuilder, ) { }
resetTheForm(): void {
this.form.reset();
}