O'Reilly logo

Mastering Web Application Development with AngularJS by Pawel Kozlowski, Peter Bacon Darwin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Building Advanced Directives

The previous chapter introduced how to develop and test your own custom directives. In this chapter we look at some of the more advanced things that you can do when developing AngularJS directives. This will include:

  • Understanding transclusion: in particular use of transclusion functions and transclusion scopes
  • Define your own directive controllers to create directives that can cooperate, and how these controllers differ from link functions
  • Terminating the compilation process and taking control: loading your own templates dynamically and using the $compile and $interpolate services

Using transclusion

When you move elements from one part of the DOM to another, you have to decide what happens to their associated ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required