1
votes

I have read a lot of articles about the differences about the 2 types of forms in angular but nowhere found practical examples. So, if I have a table, and only a checkbox to select rows, is there any good reason to use reactive form? I can't find any reason not to use the template driven method.

Select row in a table with checkbox... Template or Reactive??

Search input above this table... Template or Reactive??

(No validation)

1
It is totally up you and your project demand. Most of the time people use both of them as per requirements. However, I believe that it is important to design each module before you implement. If it is needed for certain module then include both or only one.SJNF

1 Answers

1
votes

Ideally when you have something to do which takes the control back to the business logic, you should use reactive forms.

If you want something very short and sweet which is for e.g., validating numbers or minLen or maxLen stuff, then template driven forms are the best. For complex validations, we may require to use reactive forms.

I hope this helps. Thank you.