<div #c
(ionScroll)="onPageScroll($event)"
class="test">
<ion-list >
....
...
</ion-list>
on .ts file
onPageScroll(d){
console.log(d);
}
but it never fired when I scroll on div …what’s wrong with it?
<div #c
(ionScroll)="onPageScroll($event)"
class="test">
<ion-list >
....
...
</ion-list>
on .ts file
onPageScroll(d){
console.log(d);
}
but it never fired when I scroll on div …what’s wrong with it?
Probably is because on scroll, you’re scrolling ion-content instead of this div
In Html
<ion-content (ionScroll)=“onScroll($event)”>
test test
in .ts file
@ViewChild(Content)
content: Content;
ngAfterViewInit() {
this.content.ionScrollEnd.subscribe((data)=>{
//… do things
});
}