When you create a directive, it can be used as an attribute, element or class name. To define which way to use, you need to set the restrict option in your directive declaration.
The restrict option is typically set to:
A
– only matches attribute nameE
– only matches element nameC
– only matches class name
These restrictions can all be combined as needed:
AEC
– matches either attribute or element or class name