For my project, I have incorporated tabs from Angular Material. You can find more information about these tabs here.
Below is the code snippet I am using:
<mat-tab-group animationDuration="0ms" >
<mat-tab></mat-tab>
<mat-tab (click)="setData(upgrade.name)" [label]="upgrade.name" *ngFor="let upgrade of upgradeType; let i = index"> </mat-tab>
</mat-tab-group>
The function in question is as follows:
setData(data){
alert(data)
}
However, on clicking the tab, the setData function does not execute. Any insights on why this might be happening?