What are Directives in AngularJs? - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
What are Directives in AngularJs?

What are Directives in AngularJs?

What are Directives in AngularJs?

In Angularjs, The HTML attributes and binding controls are called directives.

All HTML attributes attached with prefix "ng-". The directives are


Basic Directives
  1. ng-app : this is used for initializes to application
  2. ng-init this is used for initialize to application data
  3. ng-model : this is used for binds HTML controls to application data
  4. ng-Controller : this is used for Attached a controller class to view.
Others then basic Directives
  1. ng-repeat : this is used for bind to repeated an HTML elements
  2. ng-if this is used for bind an HTML elements with condition
  3. ng-grid this is used for bind data collection to an HTML elements
  4. ng-show : this is used for Show the HTML elements
  5. ng-hide : this is used for Hide the HTML elements
  6. ng-class : this is used for CSS binding class
  7. ng-src : this is used for pass the URL image etc.
  8. ng-switch
  9. ng-bind etc.
Event Listener Directives
  1. ng-click : This is a click event to bind on HTML elements
  2. ng-dbl-click
  3. ng-mousedown
  4. ng-mouseup
  5. ng-mouseenter
  6. ng-mouseleave
  7. ng-mousemove
  8. ng-mouseover
  9. ng-keydown
  10. ng-keyup
  11. ng-keypress
  12. ng-change
Types of Directive
  1. Element directives
  2. Attribute directives
  3. CSS class directives
  4. Comment directives 

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.