taiga-front/app/coffee/modules/common/bind-scope.coffee

16 lines
375 B
CoffeeScript

module = angular.module("taigaCommon")
BindScope = (config) ->
if !config.debugInfo
jQuery.fn.scope = () -> this.data('scope')
link = ($scope, $el) ->
if !config.debugInfo
$el
.data('scope', $scope)
.addClass('tg-scope')
return {link: link}
module.directive("tgBindScope", ["$tgConfig", BindScope])