Angular ng-repeat Error “Duplicates in a repeater are not allowed.”

后端 未结 10 2359
青春惊慌失措
青春惊慌失措 2020-11-22 06:11

I am defining a custom filter like so:

10条回答
  •  被撕碎了的回忆
    2020-11-22 06:30

    My JSON response was like this:

    {"items": 
       [
          {
          "index": 1,
          "name": "Samantha",
          "rarity": "Scarborough",
          "email": "maureen@sykes.mk"
        },
          {
          "index": 2,
          "name": "Amanda",
          "rarity": "Vick",
          "email": "jessica@livingston.mv"
        }]
    }
    

    So, I used ng-repeat = "item in variables.items" to display it.

提交回复
热议问题