Having an issue with Angular 2. The Main component displays the menu, and it has a child component called Tabs. This Tabs component dynamically adds Tab components when menu items are clicked in the Main component. Using @ContentChildren in the Tabs component successfully retrieves all the Tab components. However, I need to pass these contentchildren up to the Main component for proper functionality. Any suggestions on how to achieve this? I've attempted emitting, but it's not working as expected.
@ContentChildren(TabComponent) tabs: QueryList<TabComponent>;
@Output() public tabsArrayStart = new EventEmitter();
this.tabsArrayStart.emit(this.tabs);