How to use `trackBy` with `ngFor`

后端 未结 4 1931
攒了一身酷
攒了一身酷 2020-11-28 08:52

I can\'t really understand what I should return from trackBy. Based on some examples I\'ve seen on the web, I should return the value of some property on the ob

4条回答
  •  渐次进展
    2020-11-28 09:46

    This angular NgFor document will help you. https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html

    Below example for your code

    {{user.name}} -> {{user.score}}

提交回复
热议问题