Edited based on this jQuery plugin https://github.com/rmm5t/jquery-timeago by @rmm5t.
Provided a directive angularTimeago from module angularTimeago.
- Include
angular-timeago.js - Inject
angularTimeagomodule in your app's main module, likedemoAppin the example - Use the markup on page
<div angular-timeago="2015-01-29T09:35:56Z"></div> - Date format is in ISO8601
From
<div angular-timeago="2015-01-29T09:35:56Z"></div>To
<div angular-timeago="2015-01-29T09:35:56Z" class="ng-isolate-scope">
<span class="ng-binding">about an hour ago</span>
</div>Patrick Zhong (@zhongsp)