Angular forms
Forms are such an integral part of HTML development that any framework that targets client-side development just cannot ignore them. Angular provides a small but well-defined set of constructs that make standard form-based operations easier.
If we think carefully, any form of interaction boils down to:
- Allowing user inputs
- Validating those inputs against business rules
- Submitting the data to the backend server
Angular has something to offer for all the preceding use cases.
For user input, it allows us to create two-way bindings between the form input elements and the underlying model, hence avoiding any boilerplate code that we may have to write for model input synchronization.
It also provides constructs to validate the input before it can be submitted.
Lastly, Angular provides HTTP services for client-server interaction and persisting data to the server. We'll cover those services in Chapter 3, Supporting Server Data Persistence.
Since the first two use cases are our main focus in this chapter, let's learn more about Angular user input and data validation support.