Reputation: 3805
I am using angular material 2 tabs and i wanted to have next button in one tab which navigates to another tab after clicking it. What should i need to use to achieve that functionality?
Upvotes: 4
Views: 2907
Reputation: 58533
Its preety simple :
<mat-tab-group class="demo-tab-group" #matgroup>
....
</mat-tab-group>
<button (click)='matgroup.selectedIndex = 2'>Go Next</button>
Upvotes: 7