AngularJS-unit 2
AngularJS-unit 2
and Expressions
AngularJS Directives
• AngularJS facilitates you to extend HTML with new attributes. These
attributes are called directives. There is a set of built-in directive in
AngularJS which offers functionality to your applications. you can
create custom directives for your application.
• Directives are markers on a DOM element that tell AngularJS to
attach a specified behavior to that DOM element or even transform
the DOM element and its children.
• Most of the directives in AngularJS are starting with ng- where ng
stands for Angular.
Directive Description
ng-app Auto bootstrap AngularJS application.
ng-bind Replaces the value of HTML control with the value of specified AngularJS expression.
ng-repeat Repeats HTML template once per each item in the specified collection.
ng-show Display HTML element based on the value of the specified expression.
ng-readonly Makes HTML element read-only based on the value of the specified expression.
ng-disabled Sets the disable attribute on the HTML element if specified expression evaluates to true.