Creating Custom Directives

In Chapters 1012, I showed you how to use the built-in directives that AngularJS provides, including directives that handle one- and two-way data bindings (ng-bind and ng-model), generate content from data (such as ng-repeat and ng-switch), manipulate HTML elements (such as ng-class and ng-if), and respond to user interaction (such as ng-click and ng-change). In Chapter 12, I demonstrated the directives that replace the standard HTML form elements to enable data validation and perform common tasks such as generating option elements.

AngularJS comes with a comprehensive range of directives that address most ...

Get Pro AngularJS now with O’Reilly online learning.

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