aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorLucas Galfasó2013-05-24 21:18:51 -0300
committerMisko Hevery2013-07-31 10:30:58 -0700
commitb3777f275c6bd2bd4a88963fd03828eb7cf3aca8 (patch)
tree86d62c51db20647a59bb76912d8122cfcc0b7fe0 /docs
parentaa5a16224bb4e19f44fafebaf04ece7665d5ad5b (diff)
downloadangular.js-b3777f275c6bd2bd4a88963fd03828eb7cf3aca8.tar.bz2
feat(directive): support as instance syntax
Support controller: 'MyController as my' syntax for directives which publishes the controller instance to the directive scope. Support controllerAs syntax to define an alias to the controller within the directive scope.
Diffstat (limited to 'docs')
-rw-r--r--docs/content/guide/directive.ngdoc7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/content/guide/directive.ngdoc b/docs/content/guide/directive.ngdoc
index 5e682d58..ea1c9ced 100644
--- a/docs/content/guide/directive.ngdoc
+++ b/docs/content/guide/directive.ngdoc
@@ -401,6 +401,13 @@ compiler}. The attributes are:
* `^` - Locate the required controller by searching the element's parents.
* `?^` - Attempt to locate the required controller by searching the element's parents, or return `null` if not found.
+ * `controllerAs` - Controller alias at the directive scope. An alias for the controller so it
+ can be referenced at the directive template. The directive needs to define a scope for this
+ configuration to be used. Useful in the case when directive is used as component.
+
+ * `require` - Require another controller be passed into current directive linking function. The
+ `require` takes a name of the directive controller to pass in. If no such controller can be
+ found an error is raised. The name can be prefixed with:
* `restrict` - String of subset of `EACM` which restricts the directive to a specific directive
declaration style. If omitted, the default (attributes only) is used.