I have a map with key values as follows
$scope.items = {
{
0={"name": "Jim", "age" : 25}
},
{
1={"name": "Eric", "age" : 25}
}
};
if it was an array to count the size I with do:
<div ng-repeat="item in items>
</div>
and have the size {{items.length}}
In case of a map I with iterate items as follows:
<div ng-repeat="(id, item) in items">
</div>
but how to establish the size?
Any help is appreciated.
$scope.items = [{"name": "Jim", "age" : 25}, {"name": "Eric", "age" : 25}]. Or if this is an object then:$scope.items = {0: {"name": "Jim", "age" : 25}, 1: {"name": "Eric", "age" : 25}}.