Ng-lazyload-image: 滚动时未加载图像

创建于 2019-04-03  ·  2评论  ·  资料来源: tjoskar/ng-lazyload-image

我正在使用您在 ionic 3 中的延迟加载来加载图像。 但是只有很少的图像,其余图像不会在滚动时加载。 我没有使用任何对内容的引用。
我的代码
我将您的插件导入为
LazyLoadImageModule.forRoot({ preset: intersectionObserverPreset })

我在我的应用程序中使用它
<div class="grid"> <ion-row class="row unlimited-items"> <ion-col col-6 class="col" *ngFor="let item of products "> <ion-card tappable (click)="getProduct(item.id)"> <img class="image" style="height:auto;width:100%;" [defaultImage]="loadingAnimation" [lazyLoad]="item.images[0].src"> <h5 *ngIf="item.name" class="card-name">{{item.name}} </h5> <p class="pricehtml" [innerHTML]="item.price_html"> </p> </ion-card> </ion-col> </ion-row> </div>
我附上了截图。 等待您的回复。

Screen Shot 2019-04-03 at 3 31 44 PM

所有2条评论

更新到[email protected]和 angular 7 解决了这个问题。 感谢您解决。

好的! 然后我关闭这个。

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

lares83 picture lares83  ·  3评论

sandeepdussa picture sandeepdussa  ·  9评论

AndreasSchmid1 picture AndreasSchmid1  ·  3评论

coryrylan picture coryrylan  ·  7评论

audacitus picture audacitus  ·  5评论