// Need to wait until the component has been initialized
ngAfterViewInit() {
// Here 'my-content' is the ID of my ion-content
this.content = this.app.getComponent('my-content');
this.content.addScrollEventListener(this.onPageScroll);
}
onPageScroll() {
console.log('They see me scrolling...');
}
@brandyshea, what is the datatype of the “this.content”? I’m using typescript, and I get an error:
app.bundle.js:431 Uncaught (in promise) TypeError: this.content.addScrollEventListener is not a function(…)
Thanks for the hint @brandyshea. I have a problem detecting iOS momentum. I need to fire events during the scroll (user removes the finger, but momentum is still scrolling). Event fires at the end of momentum. Do you have any solution for this? Thank you