I am working with a mat-tab-group component in Angular :
mat-tab-group
class="brand-tabs"
[disableRipple]="true"
*ngSwitchCase="types.project"
(selectedTabChange)="changeProjectTab($event)"
[selectedIndex]="selectedProjectIndex"
>
.........
This is the function in my component's TypeScript file :
changeProjectTab(event) {
if (event.index > 0) {
this.selectedProjectIndex = 0;
this.modalService.contentModal(
this.upgradeRef,
this.translateService.instant('message')
);
}
}
I have 3 tabs in the mat-tab-group and I want to prevent navigation to tabs with index 1 and 2, always remaining on tab with index 0. The current solution I tried is not working. Any ideas on how to achieve this? Thank you.