<div ng-repeat="badgesData in deptUSersData.badges | limitTo : 7 track by $index">
........content.......
</div>
If the length of deptUSersData.badges
is more than 8, I want to apply a limit of 7. How can I achieve this?
My desired solution would look something like this:
<div ng-repeat="badgesData in deptUSersData.badges
ng-if="deptUSersData.badges.length > 8" ? limitTo : 7 : '' track by $index>