我正在使用 Ionic 3。
这是我的模板:
<ion-slides autoplay="5000" loop="true" speed="500" class="slides" pager="true">
<ion-slide *ngFor="let Image of PImage">
<img src="{{Image.URL}}" alt="Product Image">
</ion-slide>
</ion-slides>
但我遇到了这个错误
TypeError: Cannot read property 'hasAttribute' of undefined
我该怎么解决这个问题呢?
请给予建议。
谢谢。
<ion-slides *ngIf="PImage && PImage.length" autoplay="5000"...>...</ion-slides>
,看看能否解决问题?似乎问题可能与数据准备好之前创建幻灯片有关... - sebaferreras