In this video...
You will learn how to utilize form elements and form controls in an Angular application, and access the values that a user enters into those controls in our component.
Forms are an important part of interacting with a user. The form element and the various input elements are used in most applications. We'll see how Angular adds additional functionality, directives, and events to allow us to work with forms. Through the use of
#formName="ngForm" we can access this data in events. The standard event we listen to is the ngSubmit event on the form. Typically we access the data through
(ngSubmit)="handleSubmit(formName.value)" which will pass all of the form data into this event handler.