I am working on a feature where I need to identify the current user in a list of all users. Below is an example of what my code currently looks like.
<div class='user' ng-repeat='user in users'>
<span class='name'>{{ user.displayName }}</span>
</div>
What I want to achieve is to compare currentUser.id
with each user.id
as I traverse through them, and potentially add a special class when there is a match. Ideally, the code snippet below represents what I envision:
ng-class='highlight: if user.id == currentUser.id'