angular Means (JSON, object hasOwnProperty), angular, , $$hashKey DOM, :
$scope.items = [
{"ab" : 1", "bc" : 3},
{"ab" : 1, "bc" : 3}
]
angular Simple Array
$scope.simpleArrray=[1, 1, 1, 1];
ng-repeat angularJS Hash Iterate JSON object Array, Duplicate ID, , , JSON object , JSON object
, .
function AController($scope) {
var a = {"ab" : 1, "bc" :3}
var b = a;
$scope.objsInObj = [
a,
b
]
}
In the above case, in ng-repeat, when the object ain Iteration angular adds $$hashKeyin a, when bin the iteration it points to awhich already has $$hashKey>, therefore angular will not add a new one $$hashKeyand will return a'sHashkey so that it is Duplicate, therefore angular Raup duplicate Error
source
share