get mat-button-toggle value in angular component code example

Example 1: mat toggle button

import {MatSlideToggleModule} from '@angular/material/slide-toggle';

<mat-slide-toggle>Slide me!</mat-slide-toggle>

Example 2: mat-button-toggle selected default

<mat-button-toggle-group class="right-aligned" value="book">
  <mat-button-toggle value="italic" value="edit"><mat-icon>edit</mat-icon></mat-button-toggle>
  <mat-button-toggle value="bold" value="book"><mat-icon>import_contacts</mat-icon></mat-button-toggle>
</mat-button-toggle-group>