I am using Template driven form in my application.
When i'am submitting the form then that time i have use reset method.
I have found another formReset() method, i have check both method they work as same
For Angular best practice which method is useful to use? and how?
In a Model driven form to reset the form we just need to call the function reset() on our model for to resets all the input fields to go back to their initial state.
similarly To reset form in template driven form, NgForm has resetForm() method to reset the form.
I hope this will be useful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With