13 Using events and forms
This chapter covers
- Using bindings to respond to events
- Using template references
- Using two-way bindings to synchronize component properties and HTML elements
- Validating form data and displaying validation error messages
In this chapter, I continue describing the basic Angular functionality, focusing on features that respond to user interaction. I explain how to create event bindings and how to use two-way bindings to manage the flow of data between the model and the template. One of the main forms of user interaction in a web application is the use of HTML forms, and I explain how event bindings and two-way data bindings are used to support them and validate the content that the user provides. Table 13.1 puts events and forms in context.