docs(guide/directive): update directive restrict options

- add missing 'C' restriction for class names
This commit is contained in:
pyriand3r
2014-01-13 10:13:13 +01:00
committed by ashley williams
parent 794e5e6098
commit 713f9758e2
+6 -2
View File
@@ -284,14 +284,18 @@ If we simply put a `<my-customer>` element into the HTML, it doesn't work.
<div class="alert alert-waring">
**Note:** When you create a directive, it is restricted to attribute only by default. In order to
create directives that are triggered by element name, you need to use the `restrict` option.
create directives that are triggered by element or class name, you need to use the `restrict` option.
</div>
The `restrict` option is typically set to:
* `'A'` - only matches attribute name
* `'E'` - only matches element name
* `'AE'` - matches either attribute or element name
* `'C'` - only matches class name
These restictions can all be combined as needed:
* `'AEC'` - matches either attribure or element or class name
Let's change our directive to use `restrict: 'E'`: