Annoying AngularJS ngRepear Dups error

by 1 replies
2
I am using angularJS to create a webbased mobile application. AngularJS is good and there is no need to prove it here. But one problem i often face is ngRepeat Dupes error. I could not understand the mechanism of this error. when i searched on google , people were saying that this error comes when there is duplicate data . But there was a time when I retrieved data from a table where duplicate data without any error. and there was also a time when I got error even there is no duplicate data in the table(database table). So I could not understand the actual reason of this error. Which thing should not be duplicate.
Thanks.
#programming #angularjs #annoying #dups #error #ngrepear
  • Dups in a ngRepeat directive are not allowed.

    if you are doing this
    <div ng-repeat="row in ['a','a','a']"/>

    try to use the "trac by $index" which uses the index of the array

    <div ng-repeat="row in ['a','a','a'] track by $index"/>

Next Topics on Trending Feed

  • 2

    I am using angularJS to create a webbased mobile application. AngularJS is good and there is no need to prove it here. But one problem i often face is ngRepeat Dupes error. I could not understand the mechanism of this error. when i searched on google , people were saying that this error comes when there is duplicate data . But there was a time when I retrieved data from a table where duplicate data without any error. and there was also a time when I got error even there is no duplicate data in the table(database table). So I could not understand the actual reason of this error. Which thing should not be duplicate. Thanks.