Implementing AngularJS within the context of the Ionic framework. The $scope on the front-end consists of:
an object User that contains a list of sports:
$scope.user = { sports: { "running": true, "football": true } }
a list named "matches" containing users and their respective sports. For example:
matches = { userA: {..., sports: {"running": true, "football": true} }, userB: {..., sports: {"rugby": true, "football": true} }
Within the 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 am aiming to visually emphasize the shared sports between $scope.user and each $scope.matches.user (e.g. highlighting them in red).
Any suggestions on how I could achieve this?
Thank you