I am new to ionic native and basically trying to change the particular icon from the list of icons, in my case on click of toggle all the icons are changing. - Here is my code
Need more of Ionic solution for the problem i am facing.
HTML-
<ion-card *ngFor=“let post of posts”>
{{post.bookname}}
{{post.price}}
<button ion-button clear small color=“danger” icon-start (click)=‘toggle(this)’>
<ion-icon [name]=“visible ? ‘heart’ : ‘heart-outline’”> - Here i am changing the icon
TS -
visible: boolean;
toggle(){
this.visible = !this.visible;
}