Why is ng-repeat running *three times* for one index?
Lets say we have a json file we want to run ng-repeat on to presentate.
[
{
"meta": 1
}
]
Doing ng-repeat:
<div ng-repeat="meta_ in metas">
{{sayHello(meta_,$index)}}
<h3>{{meta_.meta}}</h3>
</div>
where {{sayHello(x,i)}} does:
$scope.sayHello = function(x,i){
console.log("LOG: " + x.meta.toString() + " -- LEN: " + $scope.metas.length + " -- IX: " + i.toString() );
}
Output is:
LOG: 1 -- LEN: 1 -- IX: 0
LOG: 1 -- LEN: 1 -- IX: 0
LOG: 1 -- LEN: 1 -- IX: 0