I'm having an issue with using Angular filters within the context of ng-repeat.
Take a look at my code snippet:
<ul id="testDiv2" class="dropdownH">
<input type="text" placeholder="Keyword Filter" data-ng-model="search.category.category_name">
<li data-ng-repeat="category in categories track by $index | filter: search.category.category_name"
data-ng-click="selectCategory($index)">
<div class="colony pull-left">
<span>{{category.category_name}}</span>
</div>
<div class="pull-right">
<input type="radio" name="tag" />
<label></label>
</div>
</li>
</ul>
The above code is giving me trouble. Interestingly, when I remove track by $index
, it works just fine.
Any advice or suggestions on how to resolve this? Let me know!