top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is restrict option in directive?

0 votes
246 views
What is restrict option in directive?
posted Oct 9, 2017 by Jayshree

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The restrict option in angular directive, is used to specify how a directive will be invoked in your angular
app i.e. as an attribute, class, element or comment.
There are four valid options for restrict:

'A' (Attribute)- <span my-directive></span>
'C' (Class)- <span class="my-directive:expression;"></span>
'E' (Element)- <my-directive></my-directive>
'M' (Comment)- <!-- directive: my-directive expression -->
answer Oct 9, 2017 by Shivaranjini
...