AngularJS code for when i scrolled to bottom of page

$document.bind(‘scroll’, function(){

if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight-1) {
alert(“you’re at the bottom of the page”);
console.log(“You are reached to bottom”);

}
});

--

--

Artificial Intelligence and Data Science

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store