angular toggle on click for code example
Example: angular onclick toggle class
// component.ts
toggleClass: boolean = false;
// component.html
<button (click)="toggleClass = !toggleClass" [ngClass]="{ 'button--grey': !toggleClass }">
Confirm
</button>