What is an AngularJs directive?

What is an AngularJs directive?

AngularJs directives are an extension over the HTML that let you extend the HTML DOM to add the special behavior to it.

If you have created any application using AngularJs, you have used AngularJs directives in that whether you have realized it or not. You might have used simple directives like ‘ng-app’, ‘ng-model’, ‘ng-repeat’, ’ng-controller’ etc. 

What all these directives do?

Well, they attach special behavior to the HTML elements for example ‘ng-app’ attaches the behavior to identify which part of HTML contains AngularJs app.

Types of Directives:-
1.      Interpolation Directive
2.      ng-bind Directive
3.      ng-view and ng-template Directive
4.      Escaping HTML From The Model
5.      Conditional Rendering
6.      ng-show and  ng-hide Directives
7.      ng-switch Directive
8.      ng-if, ng-else-if and ng-else Directive
9.      ng-include Directive
10.  ng-cloak Directive
11.  ng-repeat Directive
·         ng-repeat for Variables
·         Repeating Multiple Elements

For more, below link help you!


About Blogger

ANIL SINGH

Hey! I am Anil Singh. I am Active Blogger, Writer and Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
http://www.code-sample.com
http://www.code-sample.xyz

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book