wix-incubator / angular-tree-control

Angular JS Tree
http://wix.github.io/angular-tree-control
MIT License
707 stars 276 forks source link

Set specific icon for node #277

Open noorbakerally opened 7 years ago

noorbakerally commented 7 years ago

Is it possible to set a specific icon for a node ?

shenghou commented 6 years ago

Yes, you can add specific icon or other what you want , like this. <treecontrol class="tree-boot" tree-model="treeData" options="treeOptions" expanded-nodes="expandedNodes" on-selection="seleNode(node,$index,$first,$last,$path,selected,expanded,$result)" selected-node="groupActive"> <span title="{{node.description}}"> <span ng-switch="" on="node.taxonomy"> <span ng-switch-when="terminalgroup" class="fa fa-folder-open" aria-hidden="true"></span> </span> <span>{{node.name}}</span> // badge <span class="badge clt-bg-success" ng-if="node.onlineNum>0">{{node.onlineNum}}</span> <span class="badge" ng-hide="node.offlineNum==0&&node.onlineNum>0">{{node.offlineNum}}</span> <span class="fa fa-check" ng-if="node.id==groupActive.id"></span> //icon </span> </treecontrol>

UI

image