Let's assume I'm having following code:
<li ng-repeat="task in todoList">
{{task.name}}
</li>
And let's assume this is my dataset ( Assuming it's ordered by when, from now to future ) :
var todoList = [ { name : 'Work hard', when : 'Today'}, { name : 'Play hard', when : 'Today'}, { name : 'Relax hard', when : 'This week'}, ]
How can I detect in the ng-repeat when the current repeated item is the last item with the property when set to Today ?
So I'll end up something with something like this
<li ng-repeat="task in todoList">
{{task.name}}
</li>
<!-- If last of current period, then show this -->
<li>
<h3>Next period</h3>
</li>