I am searching for a reliable solution in Angular 6 to determine whether a scrollable host component has reached its maximum scroll bottom.
Despite my efforts, I have been unsuccessful in finding a functioning example of a function that can detect if a custom scrollable container (such as a div) has scrolled to the very bottom. I've come across information about IntersectionObserver, but it doesn't seem to be what I require. I've also tried various vanilla JS functions, but haven't been able to implement them effectively within Angular.
You can view my Stackblitz here: https://stackblitz.com/edit/mark6-messenger
Please note that this is needed for an Open Source Project. In my case, the <ng-container
serves as the scrollable container: https://github.com/DevMonkeysDE/ngx-mark6/blob/master/projects/mark6-lib/src/lib/messenger/messenger-history.html#L1
The functionality should work seamlessly without requiring users to add any additional functions, ids, or elements to the component later on. The logic must be contained within the component itself.