1
0
mirror of https://github.com/taigaio/taiga-front synced 2025-10-06 03:12:55 +02:00
Files
taiga-front/app/coffee/modules/common/bind-scope.coffee
2024-04-02 15:23:43 +02:00

24 lines
589 B
CoffeeScript

###
# This source code is licensed under the terms of the
# GNU Affero General Public License found in the LICENSE file in
# the root directory of this source tree.
#
# Copyright (c) 2021-present Kaleidos INC
###
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])