I am brand new to Angular and have a list item filled with some data:
<li ng-repeat="content in contents">
<a class="item" href="#">
<p><strong>{{content.Company}}</strong></p>
<p>{{content.Town}}, {{content.PostCode}}</p>
<p>{{content.Appointment}} at {{content.txtTime}}</p>
</a>
</li>
Within my controller, I am iterating through the dates and formatting them as follows:
angular.forEach($scope.contents, function(item){
item.Appointment = moment(item.Appointment).format('MMMM Do YYYY');
})
I am attempting to insert an HTML divider to separate the appointments by date, for example displaying "today", followed by some appointments, then "tomorrow", "next week", etc.
Is this achievable with Angular? I have been struggling with this for quite some time.