Nitin Choudhary
Explain what are directives ? Mention some of the most commonly used directives in Angular.js application ?
By Nitin Choudhary in Angular on Jan 20 2015
  • Prashanth Kumar Thadaka
    Feb, 2017 28

    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 (e.g. via event listeners), or even to transform the DOM element and its children.AngularJS comes with a set of these directives built-in, like ngBind, ngModel, and ngClass. Much like you create controllers and services, you can create your own directives for AngularJS to use. When AngularJS bootstraps your application, the HTML compiler traverses the DOM matching directives against the DOM elements.

    • 0
  • Nitin Choudhary
    Jan, 2015 20

    A directive is something that introduces new syntax, they are like markers on DOM element which attaches a special behavior to it. In any Angular.js application, directives are the most important components.Some of the commonly used directives are ng-model, ng-App, ng-bind, ng-repeat , ng-show etc.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS