How to mat-button-toggle by default selected in angular
问题 How can I set default selected last button in toggle group. This is my code. <mat-button-toggle-group #group="matButtonToggleGroup"> <mat-button-toggle value="Heritage"> <span>Heritage</span> </mat-button-toggle> <mat-button-toggle value="Nature"> <span>Nature</span> </mat-button-toggle> <mat-button-toggle value="People"> <span>People</span> </mat-button-toggle> <mat-button-toggle value="All"> <span>All</span> </mat-button-toggle> </mat-button-toggle-group> 回答1: I fixed it. Simply add the