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