An Experiment In Consuming Reactive-Form Events From Template-Driven Forms In Angular 7.2.13
DRANK

Historically, I've only used template-driven forms in Angular. And, to be honest, they "just work" for me. Most of the form interfaces that I create are fairly simple and usually have a very low-level of validation requirements. As such, I've never felt much friction with them. However, many developers in the Angular community rave about the power of Reactive Forms; so, last week, I decided to take my first look at Reactive Forms in Angular. In response to that post, Lars Gyrup Brink Nielsen pointed out that my exploration didn't really leverage any of the "reactive" features of Reactive Forms. So, as a fun follow-up experiment, I wanted to see if I could access these reactive features directly from within my template-driven forms in Angular 7.2.13.Run this demo in my JavaScript Demos project on GitHub.View this code in my JavaScript Demos project on GitHub.At the end of the day, template-driven forms in Angular are really just a thin convenience layer over the underlying Reactive For…

bennadel.com
Related Topics: Angular Reactive Programming JavaScript