UNPKG

angular-ui-tree

Version:

An AngularJS UI component that can sort nested lists, provides drag & drop support and doesn't depend on jQuery

28 lines (26 loc) 784 B
(function () { 'use strict'; angular.module('ui.tree') .directive('uiTreeHandle', ['treeConfig', function (treeConfig) { return { require: '^uiTreeNode', restrict: 'A', scope: true, controller: 'TreeHandleController', link: function (scope, element, attrs, treeNodeCtrl) { var config = {}; angular.extend(config, treeConfig); if (config.handleClass) { element.addClass(config.handleClass); } // connect with the tree node. if (scope != treeNodeCtrl.scope) { scope.$nodeScope = treeNodeCtrl.scope; treeNodeCtrl.scope.$handleScope = scope; } } }; } ]); })();