I know how to pass an event from child to parent with StreamController and @Output(), but what if we want to do it the other way around? Also what if our child component is 2 levels down from the parent?
Suppose our template hierarchy looked something like this:
<a>
<b>
<c>
</c>
</b>
</a>
If we do something in <a>, how do we listen for it in <c>?
The counterpart to
@Outputis@Inputwhich allows you to pass data down from a parent to a child.Briefly:
Parent Template:
You can read more about it here https://angulardart.xyz/guide/template-syntax#inputs-outputs