How to obtain previous item in ng-repeat?

后端 未结 4 906
陌清茗
陌清茗 2020-12-03 00:51

I have a template in which I want to generate some HTML only if the current item has some different fields from the previous item. How can I access the previous item in an

4条回答
  •  情歌与酒
    2020-12-03 01:14

  • {{items[$index - 1].att == item.att ? 'current same as previous' : 'current not same as previous'}}
提交回复
热议问题