Infinite-scroll for facebook like pagination in AngularJS

Introduction

In the previous article, I have shown you how to implement autocomplete textbox in angularjs application for build highly interactive web application. Today I will show you, how to implement Infinite-scroll for facebook like pagination in AngularJS for make our web application a little more attractive.

So, What is Infinite-scroll ?

Infinite-scroll is also known as "endless scrolling", "lazy loading" etc. Infinite scroll is a way to load more data using Ajax request while page goes to scroll down. You may have seen this technique on the Facebook timeline or on Twitter's homepage.

you can see here I have added a directive (here "infinityscroll") for check the scroll position and fired an angular js method for load new content (if available) while scroll reached to end of the existing content.