ng-lazyload-image icon indicating copy to clipboard operation
ng-lazyload-image copied to clipboard

Not working with Ionic content scroll, when using ng-lazyload-image inside ion-virtual-scroll

Open Coder7777 opened this issue 4 years ago • 1 comments

  <ion-content>
    <ion-virtual-scroll #container [items]="images" approxItemHeight="320px">
      <ion-card *virtualItem="let image; let itemBounds = bounds;let i=index;">
        <div>
          <img [defaultImage]="test" [lazyLoad]="image" [errorImage]="def" />
        </div>
        <ion-card-header>
          <ion-card-title>Index{{i}}</ion-card-title>
        </ion-card-header>
        <ion-card-content>Index{{i}}</ion-card-content>
      </ion-card>
    </ion-virtual-scroll>
  </ion-content> 

whatever scroll, the image always only show the [defaultImage]

Coder7777 avatar May 13 '21 19:05 Coder7777

 <ion-content  [scrollEvents]=true #container>
      ...
          <img [defaultImage]="test" [lazyLoad]="image" [errorImage]="def" [customObservable]="container.ionScroll"/>
      ...
</ion-content>

the scroll event only can be emitted, when ion-content set [scrollEvents]=true.

Ionic 5 disabled ion-content scroll event, it's different from the previous version.

Coder7777 avatar May 13 '21 20:05 Coder7777