Two-Way Data Binding

Learn about two-way data binding in template forms.

Unlike reactive forms, we don’t have to do much to start using template forms. We don’t need to create any instances out of anything. This is because template forms are configured in templates instead of component class files. This includes things like validation.

Storing form data

All we have to do in the component class is to create the property where we’ll store the form data. We only have one input, which is for the email. We’ll update the app.component.ts class file by adding a new property, called email, for storing the email.

Get hands-on with 1200+ tech skills courses.