Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Contributor: Ravishankar ChavarePart 6- Basic of Directives in AngularJS

-Directives are a unique and powerful feature available in AngularJS. Directives let you invent new HTML syntax, specific to your application.
-We use directives to create reusable components.
-A directive is essentially a function that executes when the Angular compiler finds it in the DOM(Document Object Model).
-Each directive has a name (like ng-repeat,ng-model,etc) and each directive determines where it can be used: element, attribute, class, in a comment.

AngularJS directives are extended HTML attributes with the prefix ng-


Quote:ng-repeat ,ng-app, ng-init, ng-model etc..

AngularJS has a set of built-in directives which offers functionality to your can also create own custom directives.custom directives are used in AngularJS to extends the Functionality of html.custom directive are defined using directive function.a custom directive simply replace the element for which it is activated.directive activates when a matching attribute is encountered.

Following are some AngularJS directives commonly used to design the AngularJS web application

1ng-app & ng-show
8. ng-src

and for more angular directives list read Here official tutorial.

From Next Tutorial you will learn about all the commonly used directives with description and Examples

Part 5-Extends AngularJS in Html
Part 4- MVC AngularJS controller defined in another file
Part 3-MVC in AngularJS
Part 2- AngularJS Installation
Part 1-Introduction of AngularJS

Forum Jump:

Users browsing this thread: 1 Guest(s)