This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Invalid ng-repeat dupes error handling #9838
Closed
Description
When value can't be converted to JSON due to circular structure, dupes checking in ng-repeat fails to display a proper error message.
See
angular.js/src/ng/directive/ngRepeat.js
Line 368 in d3b1f50
toJson(value)
call fails if value contains circual reference. This is causing this error message, and hides the proper error message : Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys.
TypeError: Converting circular structure to JSON
at Object.stringify (native)
at toJson (http://localhost:9000/bower_components/angular/angular.js:1086:15)
at ngRepeatAction (http://localhost:9000/bower_components/angular/angular.js:24042:42)
at Object.$watchCollectionAction (http://localhost:9000/bower_components/angular/angular.js:13830:13)
at Object.ng.config.$provide.decorator.$delegate.__proto__.$watch.applyFunction [as fn] (<anonymous>:778:50)
at Scope.$get.Scope.$digest (http://localhost:9000/bower_components/angular/angular.js:13965:29)
at Scope.ng.config.$provide.decorator.$delegate.__proto__.$digest (<anonymous>:844:31)
at Scope.$get.Scope.$apply (http://localhost:9000/bower_components/angular/angular.js:14227:24)
at Scope.ng.config.$provide.decorator.$delegate.__proto__.$apply (<anonymous>:855:30)
at bootstrapApply (http://localhost:9000/bower_components/angular/angular.js:1487:15)