45 lines
1.3 KiB
HTML
Raw Normal View History

<h1 id="top">Component Communication Cookbook</h1>
<a href="#parent-to-child">Pass data from parent to child with input binding</a><br/>
<a href="#parent-to-child-setter">Intercept input property changes with a setter</a><br/>
<a href="#parent-to-child-on-changes">Intercept input property changes with <i>ngOnChanges</i></a><br/>
<a href="#child-to-parent">Parent listens for child event</a><br/>
<a href="#parent-to-view-child">Parent calls <i>ViewChild</i></a><br/>
<a href="#bidirectional-service">Parent and children communicate via a service</a><br/>
<div id="parent-to-child">
<hero-parent></hero-parent>
</div>
<a href="#top" class="to-top">Back to Top</a>
<hr>
<div id="parent-to-child-setter">
<name-parent></name-parent>
</div>
<a href="#top" class="to-top">Back to Top</a>
<hr>
<div id="parent-to-child-on-changes">
<version-parent></version-parent>
</div>
<a href="#top" class="to-top">Back to Top</a>
<hr>
<div id="child-to-parent">
<vote-taker></vote-taker>
</div>
<a href="#top" class="to-top">Back to Top</a>
<hr>
<div id="parent-to-view-child">
<countdown-parent></countdown-parent>
</div>
<a href="#top" class="to-top">Back to Top</a>
<hr>
<div id="bidirectional-service">
<mission-control></mission-control>
</div>
<a href="#top" class="to-top">Back to Top</a>
<hr>