items = {'apple', 'banana', 'lemon', 'cat', 'dog', 'monkey', 'tom', 'john', 'baby'}
html
<div class="variable" ng-repeat="item in items">{{item}} </div>
I am looking to achieve the following:
If the item is apple, banana, lemon
, then the variable should be fruit
.
If the item is cat, dog, monkey
, then the variable should be animal
.
If the item is tom, john, baby
, then the variable should be human
.
Fruit, animal, human are CSS classes.
Your assistance would be greatly appreciated. Thank you!