I'm a bit confused about what's going wrong here. I'm attempting to retrieve the participant of a conversation who has a username that matches the current user's. Here are the scopes in the view:
conversation: [{id: 1,
participants: [{
date: 1234,
user: [{
username: "test001",
id: 2}],
},
{
date: 1456,
user: [{
username: "test005",
id: 5}],
}]
}]
user: [{username: "test001",
id: 2}]
When I call {{user.username}}, it works fine (the scopes are loaded properly). Here is the HTML code using the filter:
<div class="list">
<a ng-repeat="conversation in conversations">
<div ng-repeat="notMe in conversation.participants | filter:{user: [{ username: user.username }] }">
{{notMe}}
</div>
</a>
</div>
I was trying to avoid creating a specific filter and thought that the built-in Angular filters should handle this situation, right? Your assistance is greatly appreciated :-)