【发布时间】:2020-02-12 01:30:00
【问题描述】:
我有这个垫子组:
mat-tab-group
class="brand-tabs"
[disableRipple]="true"
*ngSwitchCase="types.project"
(selectedTabChange)="changeProjectTab($event)"
[selectedIndex]="selectedProjectIndex"
>
.........
ts中的函数:
changeProjectTab(event) {
if (event.index > 0) {
this.selectedProjectIndex = 0;
this.modalService.contentModal(
this.upgradeRef,
this.translateService.instant('message')
);
}
}
在这个 mat-tab-group 中,我有 3 个选项卡,我想停止导航到索引 = 1,2 的选项卡,始终保持在索引 = 0 的选项卡上。我试过这样,但没有工作。你能给我一些想法吗?谢谢
【问题讨论】:
标签: angular typescript angular-material angular7 angular8