I've been searching for a solution but I couldn't find an exact scenario. I wonder anyone could help. I have ng-repeat filter list like this:
<ul>
<li ng-repeat="f in filterOptions">
<p>{{f.group}}</p>
<ul>
<li ng-repeat="o in f.options">
<input id="{{$parent.f.filtername}}{{$index}}" type="checkbox" ng-model="Filter.category[o.title]" ng-true-value="{{o.title}}" ng-false-value="" />
</li>
</ul>
</li>
</ul>
My JSON:
[
{
"group": "Product Categories",
"filtername" : "category",
"options": [
{
"title": "Category A",
"alt_titles": ["Category B, Category C"]
},
{
"title": "Category 1",
"alt_titles": ["Category 2, Category 3"]
}
]
}
]
With this, I could successfully search for items that belongs to o.titles. Now, I wonder what should I do so I could search for items that also belongs to alt_titles.
Ex: If I click on Category A, it will also loop items for Category B and Category C. Same with Category 1, it should show items on Category 2 and 3.
I hope I was clear. Please help. Thanks!
Working sample FIDDLE