{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/12764","labels_url":"https://api.github.com/repos/angular/angular.js/issues/12764/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/12764/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/12764/events","html_url":"https://github.com/angular/angular.js/issues/12764","id":104932285,"number":12764,"title":"Feature request: use track by in ng-repeat to watch for changes","user":{"login":"olegskl","id":298275,"avatar_url":"https://avatars.githubusercontent.com/u/298275?v=3","gravatar_id":"","url":"https://api.github.com/users/olegskl","html_url":"https://github.com/olegskl","followers_url":"https://api.github.com/users/olegskl/followers","following_url":"https://api.github.com/users/olegskl/following{/other_user}","gists_url":"https://api.github.com/users/olegskl/gists{/gist_id}","starred_url":"https://api.github.com/users/olegskl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olegskl/subscriptions","organizations_url":"https://api.github.com/users/olegskl/orgs","repos_url":"https://api.github.com/users/olegskl/repos","events_url":"https://api.github.com/users/olegskl/events{/privacy}","received_events_url":"https://api.github.com/users/olegskl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-04T17:19:40Z","updated_at":"2015-09-05T09:06:45Z","closed_at":null,"body":"This has been discussed in #12506, but I guess there wasn't any follow up.\r\n\r\nI'm expecting that the following should work:\r\n\r\n```js\r\nctrl.getItems = function () {\r\n  return [{id: 0}, {id: 1}, {id: 2}];\r\n};\r\n```\r\n```html\r\n<a ng-repeat=\"item in ctrl.getItems() track by item.id\">{{ item.id }}</a>\r\n```\r\n\r\nBut it doesn't and results in not-very-informative \"10 $digest() iterations reached. Aborting!\".\r\nIt would be great if `track by` would do as it says, i.e. \"track\" items.\r\n\r\nAs @coli nailed it:\r\n> I thought the whole point of `track by` was to handle the case where the function returns a new collection/object in the first place\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/137935000","html_url":"https://github.com/angular/angular.js/issues/12764#issuecomment-137935000","issue_url":"https://api.github.com/repos/angular/angular.js/issues/12764","id":137935000,"user":{"login":"olegskl","id":298275,"avatar_url":"https://avatars.githubusercontent.com/u/298275?v=3","gravatar_id":"","url":"https://api.github.com/users/olegskl","html_url":"https://github.com/olegskl","followers_url":"https://api.github.com/users/olegskl/followers","following_url":"https://api.github.com/users/olegskl/following{/other_user}","gists_url":"https://api.github.com/users/olegskl/gists{/gist_id}","starred_url":"https://api.github.com/users/olegskl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olegskl/subscriptions","organizations_url":"https://api.github.com/users/olegskl/orgs","repos_url":"https://api.github.com/users/olegskl/repos","events_url":"https://api.github.com/users/olegskl/events{/privacy}","received_events_url":"https://api.github.com/users/olegskl/received_events","type":"User","site_admin":false},"created_at":"2015-09-05T09:06:45Z","updated_at":"2015-09-05T09:06:45Z","body":"Why can't `track by` use that unique identifier to compare objects in the new array?"}}