Angularjs restrict type

The restrict option is typically set to:

‘A’ – only matches attribute name
‘E’ – only matches element name
‘C’ – only matches class name
‘M’ – only matches comment

These restrictions can all be combined as needed:

‘AEC’ – matches either attribute or element or class name
Let’s change our directive to use restrict: ‘E’: