我正在使用 Angular 4,在主要组件中我放置了一个带有 3 个选项卡的选项卡集,然后我使用它们的代码创建了其他三个组件。现在,当我单击选项卡时如何检测事件,我该怎么做?
主要成分
<tabset>
<tab heading="first">
<app-first #first></app-first>
</tab>
<tab heading="second">
<app-second #second></app-second>
</tab>
<tab heading="third">
<app-third #third></app-third>
</tab>
</tabset>
我的意思是如果像我一样(click)='function()'