In this chapter we have looked at some of the more advanced aspects of developing directives. We saw in our
alert directive, how transclusion can be used with
ng-transclude when creating widgets. The
accordion directive suite neatly demonstrated how directive controllers can be used to coordinate communication between directives. We even took complete control of the compile process by terminating the current compilation in the
field directive and the using the
$compile service to manually compile the element's contents.
In the next chapter we will be looking at what we can do to ensure that our application performance is fast and responsive.