I have an api that has 8 array objects that display fine but my angular code will not hide or show one array at a time. This is just a testing code and will be separated out later. The buttons work because I can see the index go up and down when I click on it but it still displays the whole list.
<div class="col-md-2-4"
ng-class="{'filenum-hide': index > $index + 1}">
<ul>
<li class="clearfix" ng-repeat="a in complaints">
<div class="pull-left">
{{a.FileNum}}
</div>
</li>
</ul>
</div>
<div>
<button type="button" class="btn btn-next" ng-click="index = index < complaints.length ? index + 1 : complaints.length">Next</button>
<button type="button" class="btn btn-pre" ng-click="index = index > 1 ? index - 1 : 1">Previous</button>
{{index}}
</div>
My outcome looks like this but I want only one list that iterates through the array and only shows case1, then click next, and it will show cw1dpd, etc.
Response to console.log(data) (sorry I haven't figured out how to angular.toJson log it in a nice format that you can see the nested objects so i snapshotted the console log)