我有使用$http()获取的JSON文件。它是这样的:

[ {
    "sno": "3",
  "eventname": "hockey",
  "event-type": "sports",
  "A-team": "mme",
  "B-team": "eee",
  "Gender": "male",
  "time": "2017-11-24 00:00:00",
  "isresult": "0",
  "result": "",
  "match-type": "semi",
  "venue": "downs"
}]


如果item.result,我需要将item.isresult==0显示为N / A,如果item.isresult==1,则需要显示字符串。我怎么做?

最佳答案

使用ng-if

<div ng-if="item[0].isresult ==='0'">

10-05 20:54