问题
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?
回答1:
Its preety simple :
<mat-tab-group class="demo-tab-group" #matgroup>
....
</mat-tab-group>
<button (click)='matgroup.selectedIndex = 2'>Go Next</button>
WORKING DEMO
来源:https://stackoverflow.com/questions/48313792/how-to-do-navigation-after-button-has-been-clicked-using-angular-material-2-tabs