I am using angular 6 to create a tabs module. I have split it up into two components, tab bar and a tab.
<tab-bar>
<tab (tabSelected)="selectTab(1)"></tab>
<tab (tabSelected)="selectTab(2)"></tab>
<tab (tabSelected)="selectTab(3)"></tab>
</tab-bar>
When a tab is clicked it emits tabSelected which should then trigger selectTab within the tab bar component. The issue i have is that tabSelected attempts to trigger within the page module instead of within the tab-bar module (its immediate parent).
I am hoping somebody may know what I am doing wrong here?