This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 267
267
*
268
268
* The controller can provide the following methods that act as life-cycle hooks:
269
269
* * `$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.
271
272
*
272
273
* #### `require`
273
274
* Require another directive and inject its controller as the fourth argument to the linking function. The
280
281
* controllers.
281
282
*
282
283
* 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.
285
287
*
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:
288
290
*
289
291
* * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
290
292
* * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.
You can’t perform that action at this time.
0 commit comments