python ruby-programming-language Smalltalk Vue.js Knockoutjs TypeScript JavaScript, OOPs JavaScript Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 4 Angular 2 AngularJs 1.x NodeJs Perl Programming R Programming RequireJs Rust Programming Backbonejs closure programming language go-programming-language kotlin-programming-language
What is AngularJs Directives?

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

Hi there! Welcome to my blog. My name is Anil Singh. I'm a author of this blog. For more detail about me, kindly refer to this link..
My Blogs - and
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like Powered by Blogger.
ASK Questions