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

Slides gallery don't work properly after the last image

$
0
0

@JEricaM wrote:

In my Ionic app I wanted an image gallery so I decided to use the slide system. I used the slide code that is into the ionic documentation but I have a problem: when I try to swipe the photos beyond the last, the gallery jump back to the first one, and I’m not able to go forward the last image.
The photos are retrieved from firebase database, so at first I thought it was because it was still loading them, but I’ve tried waiting for the complete loading and it didn’t work.

This is the html code:

<ion-card>
  <ion-card-header class="blue-title">
        Photos
  </ion-card-header>

  <ion-card-content>
   <ion-slides class="image-slider" loop="true" slidesPerView="2">
    <ion-slide *ngFor="let img of poi_usersssss">
      <img src="{{img}}" class="thumb-img" />
    </ion-slide>
  </ion-slides>
  </ion-card-content>
</ion-card>

And this is the .ts code from where I get the photos from database:

retrieveFoto(){
var poi_ref = firebase.database().ref("/point_of_interest/"+this.poi.chiave+"/photos");
this.poi_usersssss = [];


poi_ref.on('value',itemSnapshot =>{
  itemSnapshot.forEach(itemSnap =>{
    this.poi_usersssss.push(itemSnap.val());
    return false;
  });

});

}

I don’t understand where the problem is!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70757

Trending Articles



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