CHAPTER 17

image

Advanced Directive Features

In this chapter, I complete my coverage of custom directives by showing you the most advanced features. These are not features you will need often, but they are powerful and flexible and can help you build complex and fluid directives. Table 17-1 summarizes this chapter.

Table 17-1. Chapter Summary

Problem

Solution

Listing

Wrap elements.

Create a directive that uses transclusion.

1

Repeat transcluded content.

Use a compile function.

2

Communicate between directives.

Use directive controllers.

3–5

Create custom form elements.

Use the ngModel controller.

6

Handle external data changes in a ...

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.