Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Skip ngFor if array is empty

$
0
0

@a7mdFo2ad wrote:

i want to skip ngFor if the retrieved data length is empty
i tried to use ngIf also but didn’t work

      <ion-slides autoplay="3000" *ngIf="Ads.length" class="slideroption" loop="true" speed="300">
        <ion-slide *ngFor="let Ad of Ads">
          <img [src]="Ad?.image">
        </ion-slide>
      </ion-slides>

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>