compile

During the compilation phase, the framework compiles each directive such that it is available to be attached to the template. The compile function is called once, during the compilation step and might be useful to transform the template, before the link phase.

However, since it is not used very often, we will not cover it in this book. To get more information about this directive, you could go to the

AngularJS $compile
documentation at https://docs.angularjs.org/api/ng/service/$compile.
Related Tutorial
7. replace
9. scope
11. link
12. require
14. compile