I have a component, containing an HTML form. It is using "touched" and "valid" properties to display error message.
<span [hidden]="!someProp.touched || someProp.valid" > class="form-error-message">required</span> When the form is submitted, I create a "new" model used by the form: "this.model = new SomeFormModel();" When I do that, the "pristine" and "touched" properties reflect the old state, so the error message is displayed. Is there a way to reset the state? If not, how should I handle situation when upon form submission, it does not need to be redrawn, only reset to all inputs being empty? -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
