I am in the process of updating some old AngularJS sites/apps to new versions of Angular and had a question around how to replace the old groupBy filter.
<li ng-repeat="(key, value) in attendees | groupBy: 'location'">
<div class="item-title">{{ key }}</div>
<div ng-repeat="attendee in value"><p>{{ attendee.name }}<span ng-if="attendee.description != ''">{{ attendee.description }}</span></p></div>
</li>
Here is a mockup of the attendees data:
[{
"id": 1,
"location": "United States",
"name": "Walter Johnson",
"description": ""
}, {
"id": 2,
"location": "Canada",
"name": "Jerry Lewis",
"description": ""
}, {
"id": 3,
"location": "Canada",
"name": "Missy Mayer",
"description": "5 Years"
}, {
"id": 4,
"location": "United States",
"name": "Marvin Moore",
"description": ""
}, {
"id": 5,
"location": "United States",
"name": "Nelson Cooper",
"description": ""
}]
Is there a way I can still create an item-title for each of the unique location items from the attendess data?
Thanks for any info or direction.