Handling User Inputs: Forms
Since the early days of web applications, before the concept of Single Page Applications (SPAs), in HTML 2, the <form>
tag has been used to create, organize, and send forms to the backend.
In common applications, such as banking systems and health applications, we use forms to organize the inputs that our users need to perform in our systems. With such a common element in web applications, it is natural that Angular, a framework whose philosophy is batteries included, offers this feature to its developers.
In this chapter, we will delve into the following forms features in Angular:
- Template-driven forms
- Reactive forms
- Data validation
- Custom validations
- Typed reactive forms
By the end of this chapter, you will be able to create maintainable and fluid forms for your user, in addition to improving your productivity with this type of task.