1See also https://angular.io/docs/ts/latest/guide/reactive-forms.html (section "reset the form flags")
2
3>=RC.6
4
5In RC.6 it should be supported to update the form model. Creating a new form group and assigning to myForm
6
7[formGroup]="myForm"
8will also be supported (https://github.com/angular/angular/pull/11051#issuecomment-243483654)
9
10>=RC.5
11
12form.reset();
13In the new forms module (>= RC.5) NgForm has a reset() method and also supports a forms reset event. https://github.com/angular/angular/blob/6fd5bc075d70879c487c0188f6cd5b148e72a4dd/modules/%40angular/forms/src/directives/ng_form.ts#L179
14
15<=RC.3
16
17This will work:
18
19onSubmit(value:any):void {
20 //send some data to backend
21 for(var name in form.controls) {
22 (<Control>form.controls[name]).updateValue('');
23 /*(<FormControl>form.controls[name]).updateValue('');*/ this should work in RC4 if `Control` is not working, working same in my case
24 form.controls[name].setErrors(null);
25 }
26}