 ## Kanban WIP Limit Directive
 #############################################################################
 
-KanbanWipLimitDirective = ->
+KanbanWipLimitDirective = ($timeout) ->
     link = ($scope, $el, $attrs) ->
         status = $scope.$eval($attrs.tgKanbanWipLimit)
 
         redrawWipLimit = =>
             $el.find(".kanban-wip-limit").remove()
-            timeout 200, =>
+            $timeout =>
                 element = $el.find("tg-card")[status.wip_limit]
                 if element
                     angular.element(element).before("<div class='kanban-wip-limit'></div>")

            if headers && headers['taiga-info-order-updated']
                order = JSON.parse(headers['taiga-info-order-updated'])
                @kanbanUserstoriesService.assignOrders(order)

        return promise



    return {link: link}

module.directive("tgKanbanWipLimit", ["$timeout", KanbanWipLimitDirective])
