Hello everybody,
i have a problem and i need your help!
for example i have a object
$scope.values= [
{group :'a', value:1 },
{group :'a', value:2 },
{group :'b', value:3 },
{group :'a', value:4 },
]
and i use the ng-if to verify if i show the group
<div>
ng-repeat=" val in values"
<div ng-if="show(val.group)">
{{val.group}}
</div>
<div> {{val.value}}</div>
</div>
and in controller i have function called show
var verifay = '';
$scope.show = function (val) {
if(verify == val){
return false;
}else{
verifay = val;
return true;
}
}
but this not work because de function show is called more times than array
length, anybody can help me?
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.