Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c210ff5

Browse files
committed
docs($compile): correct what gets passed to ctrl argument
Closes #11903
1 parent 9efb0d5 commit c210ff5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ng/compile.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,16 @@
399399
* * `controller` - the directive's required controller instance(s) - Instances are shared
400400
* among all directives, which allows the directives to use the controllers as a communication
401401
* channel. The exact value depends on the directive's `require` property:
402+
* * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one
402403
* * `string`: the controller instance
403404
* * `array`: array of controller instances
404-
* * no controller(s) required: `undefined`
405405
*
406406
* If a required controller cannot be found, and it is optional, the instance is `null`,
407407
* otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown.
408408
*
409+
* Note that you can also require the directive's own controller - it will be made available like
410+
* like any other controller.
411+
*
409412
* * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
410413
* This is the same as the `$transclude`
411414
* parameter of directive controllers, see there for details.

0 commit comments

Comments
 (0)