title: Angularjs infinite-scroll for facebook like pagination
body: <p>I want to apply facebook like pagination in my application using angularjs.
  how can i find on scroll end event on angularjs.
  Currently i am trying with below code but it's don't work.  </p>
  
  <p><strong>HTML Code</strong>   </p>
  
  <pre><code>  &lt;div ng-app='myApp' ng-controller='StudController'&gt;
                 &lt;div infinite-scroll='loadMore()' infinite-scroll-distance='2'&gt;
                      &lt;div ng-repeat="stud in student.lststudent"&gt;
                          {{stud.rollno}}
                      &lt;/div&gt;
                  &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p><strong>JS Script Code</strong></p>
  
  <pre><code>&lt;script&gt;
  
      var myApp = angular.module('myApp', ['infinite-scroll']);
      myApp.controller('StudController', function ($scope, $http) {
            $scope.loadMore = function () {
  
              var data = $.param({
                  type: "new",
               });
  
              $http({
                  method: 'POST',
                  data: data,
                  headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
                  url: 'http://www.apiservice.com/api/StudentList/GetStudent'
              })
              .success(function (data) {
                  alert(JSON.stringify(data));
                  $scope.student= data;
  
  
              });
  
          };
      });
  
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>API Json Response Format</strong></p>
  
  <pre><code>{
      "lststudent": [{
          "rollno": 12,
          "name": "sam"
      }, {
          "rollno": 15,
          "name": "peter"
      }],
      "status": true,
      "message": "success"
  }
  </code></pre>