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

Commit 90fe26e

Browse files
feat($compile): allow require to be an object
This provides an elegant alternative to the array form of the `require` property but also helps to support binding of `require`d controllers to directive controllers.
1 parent 76f577a commit 90fe26e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ng/compile.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@
275275
* * a **string** containing the name of the directive to pass to the linking function
276276
* * an **array** containing the names of directives to pass to the linking function. The argument passed to the
277277
* linking function will be an array of controllers in the same order as the names in the `require` property
278-
* * an **object** whose property values are the names of the directibes to pass to the linking function. The argument
279-
* passed to the linking function will also be an object with matching keys, whose values will be the corresponding
280-
* controller.
278+
* * an **object** whose property values are the names of the directives to pass to the linking function. The argument
279+
* passed to the linking function will also be an object with matching keys, whose values will hold the corresponding
280+
* controllers.
281281
*
282282
* If no such directive(s) can be found, or if the directive does not have a controller, then an error is raised
283283
* (unless no link function is specified, in which case error checking is skipped). The name can be prefixed with:

0 commit comments

Comments
 (0)