I have this element that I\'m referencing by Id:
let infiniteScrollElement = document.getElementById(\'th-infinite-scroll-tracker\');
I
You could check whether the user has scrolled to the bottom or not in the below way...
Html file
...
...
typescript file
import { Component, HostListener } from '@angular/core';
...
...
@HostListener('scroll', ['$event'])
onScroll(event: any) {
// visible height + pixel scrolled >= total height
if (event.target.offsetHeight + event.target.scrollTop >= event.target.scrollHeight) {
console.log("End");
}
}