You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
throws "Duplicates in a repeater" error, because the default 'trackByIdFn' is calling hasKey with only the value (not the key). The generated hashes for both myObj.age and myObj.children end up as "string:20", which trips up ng-repeat.
Perhaps trackByIdFn should handle strings/numbers explicitly and use hashKey(key + value) for them? Not sure what else this impacts however.
The text was updated successfully, but these errors were encountered:
worrel
added a commit
to worrel/angular.js
that referenced
this issue
May 27, 2013
Using
ng-repeat="(key,value) in myObj"
where myObj = {
age: "20",
children: "20"
}
throws "Duplicates in a repeater" error, because the default 'trackByIdFn' is calling hasKey with only the value (not the key). The generated hashes for both myObj.age and myObj.children end up as "string:20", which trips up ng-repeat.
Perhaps trackByIdFn should handle strings/numbers explicitly and use hashKey(key + value) for them? Not sure what else this impacts however.
The text was updated successfully, but these errors were encountered: