How to access (call certain methods) of child components of (2) children componenet s of some parent (container) component; i.e, Having ParentCmp
holding inside template two children components (their selectors + template refs), and call certain methods of LoadingPanels
inside those (two children) components:
ParentCmp.html
:
....
<child1 #child1></child1>
<child2 #child2></child2>
ParentCmp.ts
:
@ViewChild('child1', read: ComponentRef<child1Cmp>) child1Cmp: ComponentRef<InvitationsBarComponent>;
@ViewChild('child2') meetingsBarCmp: Child2Cmp;
...
child1Cmp.instance.loadingPnl.load(() => {....});
child2Cmp.loadingPnl.load(() => {....});
?