In this chapter, we have seen a different way to declare a directive to manipulate the DOM. In the previous chapter, we explored different ways of working with the directive's properties. In this example, we will declare an external controller to the directive without writing any code within the directive.
Using external controllers is very common in applications that have many customized directives. They help us separate the content in a more practical way, in the same behavior of the directives template. With separated controllers, we can use many AngularJS resources, such as services and other features.
This example serves to illustrate the flexibility that directives have.