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