Commit 121e0c6b authored by Ujvari Gergely's avatar Ujvari Gergely

Added timer for fuzzytime directive

parent 554a7b45
......@@ -356,13 +356,18 @@ username = ['$filter', '$window', ($filter, $window) ->
template: '<span class="user" ng-click="uclick($event)">{{uname}}</span>'
]
fuzzytime = ['$filter', ($filter) ->
fuzzytime = ['$filter', '$window', ($filter, $window) ->
link: (scope, elem, attr, ctrl) ->
return unless ctrl?
ctrl.$render = ->
scope.ftime = ($filter 'fuzzyTime') ctrl.$viewValue
$window.setInterval =>
scope.$apply =>
scope.ftime = ($filter 'fuzzyTime') ctrl.$viewValue
, 5000
require: '?ngModel'
restrict: 'E'
template: '<span class="small">{{ftime | date:mediumDate}}</span>'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment