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

Commit 4b304a6

Browse files
docs($compile): squash me
1 parent 1d18df2 commit 4b304a6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/ng/compile.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@
267267
*
268268
* The controller can provide the following methods that act as life-cycle hooks:
269269
* * `$onInit` - Called on each controller after all the controllers on an element have been constructed and
270-
* had their bindings initialized. This is a good place to put initialization code for your controller.
270+
* had their bindings initialized (and before the pre & post linking functions for the directives on
271+
* this element). This is a good place to put initialization code for your controller.
271272
*
272273
* #### `require`
273274
* Require another directive and inject its controller as the fourth argument to the linking function. The
@@ -280,11 +281,12 @@
280281
* controllers.
281282
*
282283
* If the `require` property is an object and the directive provides a controller, then the required controllers are
283-
* bound to the controller using the keys of the `require` property. See the {@link $compileProvider#component} helper
284-
* for an example of how this can be used.
284+
* bound to the controller using the keys of the `require` property. This binding occurs after all the controllers
285+
* have been constructed but before `$onInit` is called.
286+
* See the {@link $compileProvider#component} helper for an example of how this can be used.
285287
*
286-
* If no such directive(s) can be found, or if the directive does not have a controller, then an error is raised
287-
* (unless no link function is specified, in which case error checking is skipped). The name can be prefixed with:
288+
* If no such required directive(s) can be found, or if the directive does not have a controller, then an error is
289+
* raised (unless no link function is specified, in which case error checking is skipped). The name can be prefixed with:
288290
*
289291
* * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
290292
* * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.

0 commit comments

Comments
 (0)