Ionic button color change for specific button


#1

I have multiple button like this

<button id="1" ion-button [color]="btnActive" (click)="btnActivate()">text</button>
<button id="2" ion-button [color]="btnActive" (click)="btnActivate()">text</button>
//etc..
btnActivate() {
  	//Change this button color atrr
  }

When user click on any button the color change for all buttons. What I want is change the color attribute for the clicked button only or change based on ID of the button.


#2

HTML :

<button id="1" ion-button [color]="btnActive"(click)="btnActivate($event)">text</button>

Component:

btnActivate(event) {
  event.target.setAttribute('color' ,'blue');
}