Upon receiving data from a REST api, I am faced with the following JSON content.
[
{
"names": {
"en": "test123"
},
"children": [],
"id": "68d87e8c-42f5-4f11-b25a-b30624246c3b",
"version": 1,
"code": "0",
"order": 0,
"country": "HR",
"name": "test123",
"parent": null,
"selected": false,
"hasQuestions": false,
"level": 1,
"state": "original",
"hasChildChapters": false
},
{
"names": {
"en": "test456"
},
"children": [],
"id": "d175e6d1-874e-4909-afb2-790c0a940c3f",
"version": 1,
"code": "0",
"order": 0,
"country": "HR",
"name": "test456",
"parent": null,
"selected": false,
"hasQuestions": false,
"level": 1,
"state": "original",
"hasChildChapters": false
}
]
I am attempting to showcase this content using ng-repeat directive with 'track by object.id'. The implementation is as follows:
<tr ng-repeat="chapter in chapters | filter: search track by chapter.id">
The issue arises when the ngRepeat:Dupes error continues to surface. Upon inspecting the JSON data, it has been confirmed that there are no duplicate IDs present. Could you shed some light on why the ngRepeat:Dupes error persists?