AngularJS and Scroll lazy load directive

Lazy load is a familiar task when you work with web application. For example,  when you scroll your application to the bottom of page, you want to load more data from server side. This will make a better user experience and app performance.

In angularJS, you should create a directive that will catch scroll event and call load more data function in controller when user scroll to bottom of page.

loadMoreData() function is wrote in Controller that will handle task load more data from server and bind to $scope