Angular: Empty Fiddle
http://angularjs.org/
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
<div class="col-md-2-4"
<ul>
<li class="clearfix">
<div class="pull-left">
{{complaints.FileNum}}
</div>
</li>
</ul>
<button type="button" class="btn btn-pre" ng-disabled="index == 0" ng-click="getPrevious()">Previous</button>
<button type="button" class="btn btn-pre" ng-disabled="index == items.length -1" ng-click="getNext()">Next</button>
</div>
<div>
JavaScript
var myApp = angular.module('myApp',[]);
//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});
function MyCtrl($scope) {
$scope.items = [
{
'FileNum': 'case1'
},
{
'FileNum': 'cw1dpd'
},
{
'FileNum': 'case2'
}
];
$scope.index = 0;
$scope.complaints = $scope.items[0];
$scope.getNext = function (){
$scope.index = $scope.index + 1;
$scope.complaints = $scope.items[$scope.index];
}
$scope.getPrevious = function (){
$scope.index = $scope.index - 1;
$scope.complaints = $scope.items[$scope.index];
}
}