January 28, 2023


The complete guide to the beginners as well as to the experienced Web Developers

AngularJS Directives

You can create your own directives by below steps.
  • directives are created by using the .directive function
  • directives name must use a camel case name like weAsnwer and in HTML must use  separated name like we-answer

Example: 1

Example: 2

  • E for the Element name
  • A for Attribute
  • C for Class
  • M for Comment
  • You can load another sub view & replace content replace: true

Example: 3