I'm beginner for the Angular and Angular Material, I used mat-tab
The active mat-tab is always the first tab, anyone know how to activate the 2nd tab when the using Angular material?
code
<mat-tab-group>
<mat-tab label="First"> Content 1 </mat-tab>
<mat-tab label="Second"> Content 2 </mat-tab>
<mat-tab label="Third"> Content 3 </mat-tab>
</mat-tab-group>
use the selectedIndex property
<mat-tab-group class="m-t-30" [selectedIndex]="1">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With