Skip to content

Commit 02a9543

Browse files
YonatanKragkalpak
authored andcommitted
docs(guide/component): make clear when required controllers are available
It was unclear that the required controllers are available only just before the `$onInit` lifecycle hook is triggered. Closes angular#14096
1 parent eda7ef6 commit 02a9543

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

docs/content/guide/component.ngdoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,15 @@ directly into your component without creating an extra route controller:
337337

338338
Directives can require the controllers of other directives to enable communication
339339
between each other. This can be achieved in a component by providing an
340-
object mapping for the `require` property. Here is a tab pane example built
341-
from components:
340+
object mapping for the `require` property. The object keys specify the property names under which
341+
the required controllers (object values) will be bound to the requiring component's controller.
342+
343+
<div class="alert alert-warning">
344+
Note that the required controllers will not be available during the instantiation of the controller,
345+
but they are guaranteed to be available just before the `$onInit` method is executed!
346+
</div>
347+
348+
Here is a tab pane example built from components:
342349

343350
<example module="docsTabsExample">
344351
<file name="script.js">

0 commit comments

Comments
 (0)