       updateElement = (value)->
         $(element)[0].text parseInt(value)
 
+      element.bind '$destroy', ->
+        # cancel timeout
+        $timeout.cancel timeoutPromise
+        # cancel tween
+        tweenable.stop()
+
+
 ]

        @totalDays = getTotalDaysByDates @start, @end
        @totalMonths = getTotalMonthsByDates @start, @end
        @totalYears = getTotalYearsByDates @start, @end

      $log.info "updateDifferences @totalYears: #{@totalYears}"


    getTotalDaysByDates =(startDate, endDate) ->
      startMoment = moment startDate


      recount = attrs.counterRestart or false
      max = scope.$eval(attrs.counterMax)
      timeoutPromise = null

      scope.$watch max, (value)->
        if max isnt undefined
