angular.directive

Description

Angular directives create custom attributes for DOM elements. A directive can modify the behavior of the element in which it is specified. Do not use directives to add elements to the DOM; instead, use widgets to add DOM elements.

For more information about how Angular directives work, and to learn how to create your own directives, see Understanding Angular Directives in the Angular Developer Guide.

Usage

directive(name, compileFn);

Parameters