angular-tree-control
angular-tree-control copied to clipboard
binding node property in custom node template
For example, i have a custom node template like below:
<ul {{options.ulClass}}>
<li ng-repeat="node in node.{{options.nodeChildren}} | filter:filterExpression:filterComparator {{options.orderBy}}"
ng-class="headClass(node)"
{{options.liClass}}
set-node-to-data>
{{node.label}}
<i class="tree-branch-head" ng-class="iBranchClass()" ng-click="selectNodeHead(node)"></i>
<i class="tree-leaf-head {{options.iLeafClass}}"></i>
<i>
<b>
<div class="tree-label {{options.labelClass}}" ng-class="[selectedClass(), unselectableClass()]"
ng-click="selectNodeLabel(node)" tree-transclude></div>
</b>
</i>
<treeitem ng-show="nodeExpanded()"></treeitem>
</li>
</ul>
Here the {{node.label}} binding is not working, how can i make it binding.
I have created a simple plnkr to make it clear: https://plnkr.co/edit/WdnJhmuZtibU0AyiDU3s?p=preview
I have used angular-tree-control a lot in our project, in some scenarios we want have some dynamic percentage value in front of the node icon. That's why i need the binding here, please kindly help me on this. Thanks!