Ion img dynamic


#1

Hello,

I have something like this, but does not work.

    <ion-item *ngFor="let card of cards">
      <ion-img item-left [src]="{{card.type == 'MARRY' ? 'assets/Marry.mpng' : 'assets/Default.png'}}"></ion-img>
    </ion-item>

#2

Remove the {{ }}

Or even better: put the expression in ts code so angular change detection does not go beserk