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 6.4 lists the directives that bind page and device events to the AngularJS model. Each of these directives enables you to specify an expression, which is typically a function defined in the scope, as discussed in Chapter 5, “Using AngularJS Templates to Create Views.” For example, the following is a function named
setTitle in the scope: ...