Understanding Template Forms
Explore how Angular template forms work by automatically creating form groups and controls based on your template. Understand how to access and manage form data and validation directly within the template, gaining insight into their similarities and differences with reactive forms.
We'll cover the following...
Believe it or not, template forms aren’t all that different from reactive forms. Under the hood, template forms are using form groups and controls. It might seem mysterious because we haven’t imported those classes.
When we use template forms, Angular will scan your template for <form> elements. If it finds one, it will automatically create a form group and bind it for you. This is why we never had to do it ourselves.
The same applies to <input> elements. If Angular finds an <input> ...