Most of the angular developer say the which is the best way to set a value of reactive form
1. setvalue() or patchValue()
In my opinion patchValue() is the best way to initialize the reactive form because if accidently developer miss to assign a value of field in reactive form user get the error with dealing with setValue() method.
on the other hand if we deal with patchValue() user can not get any type of error if he accidently miss to assign any fileld in the form.
1. setvalue() or patchValue()
In my opinion patchValue() is the best way to initialize the reactive form because if accidently developer miss to assign a value of field in reactive form user get the error with dealing with setValue() method.
on the other hand if we deal with patchValue() user can not get any type of error if he accidently miss to assign any fileld in the form.
No comments:
Post a Comment