10
Collecting User Data with Forms
Web applications use forms when it comes to collecting data from the user. Use cases vary from allowing users to log in, filling in payment information, booking a flight, or even performing a search. Form data can later be persisted on local storage or be sent to a server using a backend API. A form usually has the following characteristics that enhance the user experience of a web application:
- Can define different kinds of input fields
- Can set up different kinds of validations and display validation errors to the user
- Can support different strategies for handling data if the form is in an error state
The Angular framework provides two approaches to handling forms: template-driven and reactive. Neither ...
Get Learning Angular - Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.