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

Infinite scroll function not called

$
0
0

@pabloo87 wrote:

Hi, i'm new with Ionic 2, so, in order to learn to use it i'm making a small-but-awesome app. Everything was (almost) fine until I get to the infinite-sroll part of the application. I didn't find documentation on how to do it except for this one. The code I made doesn't trigger any errors but it doesn't trigger any function either :disappointed:

HTML code (just the important part):
<ion-content>
<ion-card>
<!-- I O U a code -->
</ion-card>
<ion-infinite-scroll (infinite)="getNewInfo($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>

TS code (just important part):

export class Popular {
private info: Info[] = [];

constructor(private dataservices : DataService){}

getNewInfo(infiniteScroll){
    console.log("Infinite-scroll");
    this.dataservices.getInfo().subscribe(data => {
        this.info = data;
    });
    infiniteScroll.complete();
}

}

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>