here is the scenario, i have main file tabs component where i have included text component using @ViewChild(); now on ngAfterViewInit() i am initializing menu and list of submenu. and as soon as i am done creating list of submenu i want to assign them to text component. so that when user clicks on text component he will be seeing subcomponents assigned by tabs component.
ngAfterViewInit() {
// menu initialization
// sub-menu initialization
this.tabTextComponent.nativeElement.selectedSubTabs = this.selectedSubTabs;
}
i have tried both with and without element ref but nothing works. i have also visited other solutions but nothing works for me. can anyone help me?