A Directive can be used in an element name, attributes, class name as well as comments. Types of Directives:- 1. Element Directive 2. Attributes Directive 3. Class Directive 4. Comment Directive
During compilation process when specific HTML constructs are encountered a behaviour or function is triggered, this function is referred as directive. It is executed when the compiler encounters it in the DOM.Different types of directives areElement directives Attribute directives CSS class directives Comment directives