<ion-col col-3>
<button ion-button (click)="onPunchPress($event)"><span>1</span></button>
</ion-col>
<ion-col col-3>
<button ion-button (click)="onPunchPress($event)"><span>2</span></button>
</ion-col>
How can I change color of specific button? Suppose If I click on 1st button then what to do that only its [color] attribute is changed from “light” to “danger” ?
I have tried so many way, when I use ngClass it changes class for all the buttons. I have to change of clicked one and it should be toggle click means change/revert on each button. How can I achieve it?