Directives are markers on a DOM element (such as an attribute, element name, comment or CSS class) that tell AngularJS’s HTML compiler ($compile) to attach a specified behavior to that DOM element or even transform the DOM element and its children.

Example:

{{ firstName + ” ” + lastName }}

In this example, the ng-app and ng-controller directives are used to define the AngularJS application and controller, respectively.

Leave a Reply

Your email address will not be published. Required fields are marked *