Skip to content

angular-whenScrolled is a directive that you can use to implement infinite scrolling in your AngularJS applications. (NO requires jQuery to run)

Notifications You must be signed in to change notification settings

juanxme/angular-whenScrolled

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

angular-whenScrolled

angular-whenScrolled is a directive that you can use to implement infinite scrolling in your AngularJS applications. (NO requires jQuery to run)

Getting Started

<script type='text/javascript' src='path/to/angular-whenScrolled.js'></script>
  • Ensure that your application module specifies angular-whenScrolled as a dependency:
angular.module('myApplication', ['angular-whenScrolled']);
  • Use the directive by specifying an whenScrolled attribute on an element.
angular.controller("demo", function ($scope, $http) {
    $scope.users = [];
    
    $scope.more = function () {
        $scope.loading = true;
        $http.get("/app/js/models/users.json").success(function (data) {
            for (user in data.users) {
                $scope.users.push(user);
            }
            $scope.loading = false;
        });
    };
    $scope.more();
});
  • html:
<div ng-controller='demo'>
    <ANY when-scrolled="more()" >
    </ANY>
    <div ng-show='loading'>Loading Data ...</div>
<div>

About

angular-whenScrolled is a directive that you can use to implement infinite scrolling in your AngularJS applications. (NO requires jQuery to run)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published