From 713f9758e212179c360ed8c4a460f6e66028c0a8 Mon Sep 17 00:00:00 2001 From: pyriand3r Date: Mon, 13 Jan 2014 10:13:13 +0100 Subject: docs(guide/directive): update directive restrict options - add missing 'C' restriction for class names --- docs/content/guide/directive.ngdoc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'docs/content/guide') 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 `` element into the HTML, it doesn't work.
**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.
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'`: -- cgit v1.2.3