I am using groupBy from angular-filter to group an array of objects by their date property.
We can achieve this by ordering the data in controller & converting groupBy output to Array.
In controller, order the records before sending it to view :
$scope.events = $filter('orderBy')(events, '-date');
Now the template, receives data in sorted order. After grouping, we need to transform it to Array :
{{ day | dayEvents[0].date: mediumDate }}