0
How do I change only the checkbox I’m clicking?
checked:boolean=false;
ck() {
if(this.checked === false){
this.checked=true;
}else{
this.checked=false;
}
<ion-item>
<ion-label class="title" [class.title-service-check]="checked">item 01 <span class="box-service-price">R$ 80,00</span></ion-label>
<ion-checkbox color="green" (click)="ck()"></ion-checkbox>
</ion-item>
<ion-item>
<ion-label class="title" [class.title-service-check]="checked">item 02 <span>R$ 80,00</span></ion-label>
<ion-checkbox color="green" (click)="ck()"></ion-checkbox>
</ion-item>
I do not use Ionic, I do not know if here has how to perform Ionic, but you have tried to put
this
insideck()
?– Alex