<div ng-repeat="msg in currDateByMsg[msgDate.strDate]|orderBy :'-SendMsgDate':true">
<div ng-if="!msg.currentUser">
<div data-ng-if="$first || (currtDateByMsg[msgDate.strDate][$index].userId !=
currDateByMsg[msgDate.strDate][$index -1].userId)">
<img class="img-circle" ng-src="{{msg.iconPath}}"/>
</div>
</div>
<div>{{msg.userMessage}}</div>
</div>
i want to skip images when more than on message come from same user(i.e- show only one image).I'm iterating in reverse order but $index value is taking from 0. so how i reverse the index value too.
Store it first
then
In html.