Skip to content

Commit

Permalink
using setErrors isntead of the hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
lathonez committed Feb 18, 2016
1 parent 79b615a commit cc5c0a5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/services/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ export class Utils {
// http://stackoverflow.com/questions/33084280/how-to-reset-control-value
public static resetControl(control: AbstractControl): AbstractControl {
control['updateValue']('');
control['_touched'] = false;
control['_untouched'] = true;
control['_pristine'] = true;
control['_dirty'] = false;
control.setErrors(null);
return control;
}
}

0 comments on commit cc5c0a5

Please sign in to comment.