Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

Hi. How to change a selected icon inside ngFor on click. i tried using ngclass, but it ended up in changing all the icons in the loop. Please help

$
0
0

@AnonymousIndian wrote:

<ion-col size="6" *ngFor="let mylocation of currentLocation; let i=index">
    <img src={{mylocation.img}} />
    <ion-item lines="none">
      <p style="margin-inline-start: unset; font-weight: bold;font-size: 12px;">{{{{mylocation.name}}</p>
      <ion-icon *ngIf="!joinRequest" (click)="sendRequest(i)" slot="end" name="person-add"></ion-icon>
      <ion-icon slot="end" *ngIf="joinRequest" name="checkmark-circle"></ion-icon>
    </ion-item>
  </ion-col>

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>