If you do something like:
ng-repeat="(key, value) in directoryResult | groupBy: 'TableId' as result"
then there resultwill be a filtered variable. You can check the length of this number for the number of groups.
Update:
Here is a plunker with a groupBy filter.
http://plnkr.co/edit/8jB4wSRtKfVmEsTGZtfV?p=preview
, ( angular ) length. .
2:
:
http://plnkr.co/edit/iwUkIMjvevja7KyfTrFC?p=preview
angular -filter length, Object.keys
<div>Number of groups: {{numGroups(result) }} </div>
JS:
$scope.numGroups = function(input){
return Object.keys(input).length;
}
3:
: "", . , :
<div>Number of groups: {{numGroups(result[key]) }} </div>
4
, numGroups, :
<div>Number of groups: {{result[key].length}} </div>
, , . , .
source
share