AngularJS templates enable you to bind browser events to controller code. This means you can handle user input from the scope’s perspective. You can then implement handlers for browser events directly to the appropriate scope. The
event directive works very much like the normal browser event handlers, except that they are directly linked to the scope context.
Table 24.4 lists the directive that binds page and device events to the AngularJS model. Each of these directives allows you to specify an expression, which is typically a function defined in the scope, as discussed in Chapter 23, “Using AngularJS Templates to Create Views.” For example, the following is a function named
setTitle in the scope: ...