Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binding node property in custom node template #288

Open
ramseyfeng opened this issue Mar 13, 2018 · 0 comments
Open

binding node property in custom node template #288

ramseyfeng opened this issue Mar 13, 2018 · 0 comments

Comments

@ramseyfeng
Copy link

ramseyfeng commented Mar 13, 2018

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant