Using AngularJS in the Ionic framework. On the front-end side the $scope contains
an object User which contains a list of sports:
$scope.user = { sports: { "running": true, "football": true } }
a list named "matches" that contains a list of users and each user has sports. example:
matches = { userA: {..., sports: {"running": true, "football": true} }, userB: {..., sports: {"rugby": true, "football": true} }
In y front-end:
<ion-item class="item-thumbnail-left" ng-repeat="match in matches track by match.user.uid">
<img>
<span>{{match.user.firstname}} {{match.user.lastname}}</span>
<h3>{{match.user.position}} - {{match.user.lob}}</h3>
<h3>@{{match.company}}</h3>
<h4>{{match.score}} sport(s): </h4>
<h4 ng-repeat="sport in match.user.sports track by sport.id" style="float: left;">
{{sport.name}}
</h4>
</ion-item>
I want to highlight the sports that $scope.user has in common with each $scope.matches.user (for instance let's say color the sports in red).
How would you suggest I do this?
Thanks