Answers for "mat-button-toggle checked functionality"

0

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>
Posted by: Guest on February-10-2021
0

mat-button-toggle checked functionality

change(evt: any) {
   if (this.value.length === 1)
      this.oldValue = this.value[0];

   if (this.value.length === 0)
      this.value = [this.oldValue];

}
Posted by: Guest on September-28-2021

Browse Popular Code Answers by Language