I've looked everywhere for a solution to my problem but I haven't found an exact match. Can anyone lend a hand? Here's the ng-repeat filter list I'm working with:
<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>
This is how my JSON looks:
[
{
"group": "Product Categories",
"filtername" : "category",
"options": [
{
"title": "Category A",
"alt_titles": ["Category B, Category C"]
},
{
"title": "Category 1",
"alt_titles": ["Category 2, Category 3"]
}
]
}
]
Currently, I can successfully search for items that fall under o.titles. Now, I need some guidance on how to also search for items belonging to alt_titles.
For example: When I click on Category A, I want to display items from Category B and Category C as well. The same goes for Category 1, which should show items from Category 2 and 3.
I hope my explanation was clear. Any help would be greatly appreciated. Thank you!
Take a look at a working sample HERE