December 2014
Intermediate to advanced
272 pages
8h 17m
English
You can apply a directive as an HTML element, an attribute, or both. The restrict property enables you to limit how your custom directive can be applied. The restrict property can be set to the following:
■ A: Applied as an attribute name. For example:
<my-directive></my-directive>
■ E: Applied as an element name. For example:
<div my-directive="expression"></div>
■ C: Applied as a class. For example:
<div class="my-directive: expression;"></div>
■ M: Applied as a comment. For example:
<!-- directive: my-directive expression -->
■ AEC: Applied as an attribute, an element, or a class name. You can ...
Read now
Unlock full access