Image on Ionic2 app html page


#1

In Ionic2 application:

Display of image(s) is successful this way:

    <ion-item>
      <ion-avatar item-start>
        <img src="{{imgPath}}">
      </ion-avatar>
    </ion-item>

but it is blank squares if I put it in ion-img:

    <ion-img src="{{imgPath}}"></ion-img>

Advice would be helpful


#2

Hello,

try with property binding like [src]=“imgPath” instead string interpolation.

Best regards, anna-liebt


#3

Hello,
also provide dimension of image, maybe by css etc.

Best regards, anna-liebt


#4

RTFM: Note: ion-img is only meant to be used inside of virtual-scroll.