diff options
| author | pyriand3r | 2014-01-13 10:13:13 +0100 | 
|---|---|---|
| committer | ashley williams | 2014-02-26 18:50:43 -0500 | 
| commit | 713f9758e212179c360ed8c4a460f6e66028c0a8 (patch) | |
| tree | 661795c7bd43a069a349394593aa8662bc4b7573 | |
| parent | 794e5e6098110d675d08058eacd35978b91887e9 (diff) | |
| download | angular.js-713f9758e212179c360ed8c4a460f6e66028c0a8.tar.bz2 | |
docs(guide/directive): update directive restrict options
- add missing 'C' restriction for class names
| -rw-r--r-- | docs/content/guide/directive.ngdoc | 8 | 
1 files changed, 6 insertions, 2 deletions
| diff --git a/docs/content/guide/directive.ngdoc b/docs/content/guide/directive.ngdoc index 9af76221..e80bb8bb 100644 --- a/docs/content/guide/directive.ngdoc +++ b/docs/content/guide/directive.ngdoc @@ -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'`: | 
