In Ionic v3 ion-content there was properties like "scrollTop". In Ionic v4 there are no more of this properties... How could I determine if a user reached the end of the content?
https://ionicframework.com/docs/v3/api/components/content/Content/ https://ionicframework.com/docs/api/content
These features are still available they are just in a different location.
After enabling it with
scrollEvents, you need to use theionScrollevent and then calculate the height based on the results of thegetScrollElement()function, not theion-content- that has a fixed height of the window height.I've written an example below. You can remove the
console.log's and tighten it up a bit, I just left them in to help you understand what's going on.Example page:
Example code:
Example logs: