AngularJS infinite scroll loading data control ngInfiniteScroll

In development, we may encounter data loading by scrolling the mouse to the bottom of the browser. The implementation of js and jquery is not complicated. Since AngularJS provides ready-made ones, why don't we use nicknames.
The ng-infinite-scroll.js component can implement:
ng-infinite-scroll.js: Download address: http://sroze.github.io/ngInfiniteScroll/
Use:
<!DOCTYPE html>
<html ng-app="lxApp" ng-controller="lxCtrl">
  <head>
    <title>Little catkins pay tribute</title>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
  	<div style="height: 700px;"></div>
  	<div infinite-scroll="mouse_scroller()">
  		<div ng-repeat="item in show"></div>
  	</div>
  </body>
  <script type="text/javascript" src="../plugins/angular/angular.js"></script>
  <script type="text/javascript" src="../plugins/angular/ng-infinite-scroll.js"></script>
  <script type="text/javascript">
  	var lxApp=angular.module("lxApp",['infinite-scroll']);
  	lxApp.controller("lxCtrl",function($scope){
  		$scope.mouse_scroller=function(){
                   //This method will be triggered every time you scroll to the bottom of the browser. Write your data loading business here.
  		};
  	});
  </script>
</html>

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326504280&siteId=291194637