Commit c37c73d5 authored by Ujvari Gergely's avatar Ujvari Gergely

fuzzyTime directive listens to to call cleanInterval()

parent 0a45b18f
......@@ -363,10 +363,16 @@ fuzzytime = ['$filter', '$window', ($filter, $window) ->
ctrl.$render = ->
scope.ftime = ($filter 'fuzzyTime') ctrl.$viewValue
$window.setInterval =>
scope.ftime = ($filter 'fuzzyTime') ctrl.$viewValue
scope.$digest()
, 5000
timefunct = ->
$window.setInterval =>
scope.ftime = ($filter 'fuzzyTime') ctrl.$viewValue
scope.$digest()
, 5000
scope.timer = timefunct()
scope.$on '$destroy', ->
$window.clearInterval scope.timer
require: '?ngModel'
restrict: 'E'
......
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