angular button code example
Example 1: onclick event in angular
(click)="myClickFunction($event)"
Example 2: mat toggle button
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
<mat-slide-toggle>Slide me!</mat-slide-toggle>
(click)="myClickFunction($event)"
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
<mat-slide-toggle>Slide me!</mat-slide-toggle>