My tabs display the number of items in each container they open. Below is the filter for that. I want to show the number of objects inside filtered.length
, I think.
Take a look at my Data:
[
{
"img":"assets/images/gallery/girls-1.jpg",
"group": "girls",
"title": "Image 1",
"desc": "Description",
"link":""
},
...
{
"img":"assets/images/gallery/space-2.jpg",
"group": "space",
"title": "Image 17",
"desc": "Description",
"link":""
}
]
Below is a screenshot of the page. Focus on the numbers within each tab. These numbers represent the amount of images in that category and accordingly, how many will appear on the right side. The implementation for that part is already complete; I simply need to display those numbers programmatically.
https://i.sstatic.net/sS1Kt.jpg
Here is the Filtered HTML I am working with:
<ul ng-init="tab = 1" class="list-group">
<li ng-class="{active:panel.isSelected(1)}">
<a class="list-group-item" ng-click="panel.selectTab(1); groupFilter = {}">All
<span class="badge badge-primary">{{galleries.length}}</span></a>
</li>
<li ng-class="{active:panel.isSelected(2)}">
<a class="list-group-item" ng-click="panel.selectTab(2); groupFilter ={group:'nature'}">Nature
<span class="badge badge-success"><!--The amount of items of group Nature. 7 --></span></a>
</li>
...
</ul>
Thank you in advance for your help. I'm currently learning Angular.