December 2014
Intermediate to advanced
272 pages
8h 17m
English
When the AngularJS HTML compiler encounters a directive, it runs the directive’s compile function, which returns the link() function. The link() function is added to the list of AngularJS directives. After all directives have been compiled, the HTML compiler calls the link() functions in order, based on priority.
If you want to modify the DOM inside a custom directive, you should use a link() function. The link() function accepts the scope, element, attributes, controller, and transclude function associated with the directive, enabling you to manipulate the DOM directly within the directive. The transclude function is a handle that is bound to the transclusion scope.
Inside the link() function, you handle ...
Read now
Unlock full access