CHAPTER 11

image

Using Element and Event Directives

In this chapter I continue to describe the directives that AngularJS provides. I describe the directives that you use to add, remove, hide, and show elements in the Document Object Model (DOM); the directives that add and remove elements from classes and set individual CSS style properties; the directives for handling events; and the directives that map between the way that AngularJS relies on data bindings and an HTML feature called Boolean attributes.

Along the way, I show you how to create custom directives to respond to events for which AngularJS doesn’t provide built-in support. I don’t get into ...

Get Pro AngularJS 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.