June 2014
Intermediate to advanced
696 pages
38h 52m
English
As with many other features of AngularJS, you can extend directive functionality by creating your own custom directives. Custom directives allow you to extend the functionality of HTML by implementing the behavior of elements yourself. If you have code that needs to manipulate the DOM, you should make this happen by using a custom directive.
You implement custom directives by calling the directive() method on a Module object. The directive() method accepts the name of a directive as the first parameter and a provider function that returns an object containing the necessary instructions to build the directive object. For example, the following is a basic definition for a directive:
Read now
Unlock full access