Netanel Basal
2 min readFeb 26, 2019

--

Hey Ward Bell, how are you?

First, I want to say that It’s OK to have different opinions and different points of view about things.

I’ve also built many applications with Angular from small ones to enterprise ones, and I’ve NEVER used ngModel, and it was fine.

We already have way too many odd things to learn in Angular.

I totally agree with you, so why does Angular makes developers life harder and have them learn two different approaches? Why do open-source libraries need to support both template-driven and reactive-driven forms?

we’ll paint ourselves in an awful corner relative to competing libraries.

I don’t agree with you. I think Angular reactive forms are the strongest case Angular has against other libraries like Vue and React, that don’t come with support for easily handling complex and dynamic forms.

You’d be surprised to hear how many companies chose Angular just because they have heavy form use and require this power and simplicity.

In my strong opinion, template-driven is OK (it could be better with just a few improvements), reactive forms is a gawd-awful mess, and if they were ever to deprecate one of them, let it be reactive forms.

That’s a valid opinion; But on the other hand, you’ll find many developers that think like me.

The reactive form class doesn’t draw itself.

I know, but that’s wasn’t my point. The point was that it is easier to look at the component and immediately see the form structure without all the noise around. Again, you are free to disagree.

In any real form, the control tree is complicated by nesting and initialization…

Yes, but most of the time it will come from your store, and it’s easier to build the form group structure based on the data. As React developers like to say — you have the power of JS.

Angular template-driven handle the complexities for you. With reactive, you have to write it all yourself.

Personally, I haven’t found writing a form group to be too complicated. Don’t forget that template-driven forms are just a syntactic-sugar for the controls created by reactive-driven ones.

I think I’ll stop here, as I see that we have sharply different opinions on this topic, and you know what? I like it 😍. And I love that you commented out with your point of view, so people that read this article will also read your comment, and decide for themselves.

I’m going to add a reference to your comment at the end of the article to help people find it.

As always, thanks for your comments, but I’m still with reactive-forms all the way. I find them to embody functionality as well as elegance.

--

--

Netanel Basal
Netanel Basal

Written by Netanel Basal

A FrontEnd Tech Lead, blogger, and open source maintainer. The founder of ngneat, husband and father.

Responses (1)