27Events and Change Detection

Angular has powerful browser events that extend HTML events by using Angular data binding to handle responses. Some of the built-in Angular events are discussed in Chapter 24, “Data Binding,” in the section “Event Binding.” This chapter goes over built-in events, custom events, and event handling with an Angular application.

Using Browser Events

Using the built-in events in Angular works like data binding. By wrapping an event name in (), you let Angular know what event you’re binding to. The event is followed by a statement that can be used to manipulate the data. The following is an example of the syntax for a built-in event:

<input type="text" (change)="myEventHandler($event)" />

Table 27.1 lists some of ...

Get Node.js, MongoDB and Angular Web Development, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.