Angular doesn't bind repeater after first push to array

后端 未结 1 657
广开言路
广开言路 2021-01-25 22:46

I have an angular repeater bound to an array. When I push a new item, the UI updates as expected, but for subsequent pushes, the array updates but the UI doesn\'t change. I alre

1条回答
  •  情书的邮戳
    2021-01-25 22:56

    It's because you are pussing the same value again and again which creates duplicate elements, try using track by index

     
  • working fiddle

    0 讨论(0)
提交回复
热议问题