Scroll + limitTo

by mickeyvip

HTML

<div class="test" ng-controller="Ctrl">
    <div ng-repeat="task in tasks">
        <button ng-click="updateTask(task);">Update</button>Counter: {{ task.counter}}
    </div>
<div>

JavaScript

var app = angular.module('app', []);

function Ctrl($scope) {
    $scope.tasks = [{
        id: 1,
        'name': 'test1',
        counter: 0
    }, {
        id: 2,
        'name': 'test2',
        counter: 0
    }, {
        id: 3,
        'name': 'test3',
        counter: 0
    }];

    $scope.updateTask = function (task) {
        ++task.counter;
    };
}