Programmatically select mat-tab in Angular 2 material using mat-tab-group
UPDATE (using newest angular+material) there are multiple ways.. possible solution, using two-way databinding <button mat-raised-button (click)=”demo1BtnClick()”>Tab Demo 1!</button> <mat-tab-group [(selectedIndex)]=”demo1TabIndex”> <mat-tab label=”Tab 1″>Content 1</mat-tab> <mat-tab label=”Tab 2″>Content 2</mat-tab> <mat-tab label=”Tab 3″>Content 3</mat-tab> </mat-tab-group> public demo1TabIndex = 1; public demo1BtnClick() { const tabCount = 3; this.demo1TabIndex = (this.demo1TabIndex + 1) % tabCount; } possible solution, using … Read more