I just started with AngularJS and got stuck with a problem.
I have a date field to show in a grid.
Date format should be relative format like "1 day ago, 10 mins ago...."
So for that i used timeAgo, so it formats the date correctly.
But I have a requirement like:
If the
last_updated_timeis less than 10 days, then show relative time like "1 day ago, 10 mins ago...." else do not apply any filter.
Here is my code snippet.
<td data-title="'Last modified'" sortable="'last_updated_time'" align='center'>
{{offer.last_updated_time | timeAgo }}
</td>
It would be great if someone can guide me how to proceed.