Open vinayakvinay opened 8 years ago
Hi, I have solved this issue hope it will be helpful to you. I have update the file angular.treeview.min.js
!function(a){"use strict";a.module("angularTreeview",[]).directive("treeModel",["$compile",function(a){return{restrict:"A",link:function(b,c,d){var e=d.treeId,f=d.treeModel,g=d.nodeId||"id",h=d.nodeLabel||"label",i=d.nodeChildren||"children",j='<ul><li data-ng-repeat="node in '+f+'"><i class="collapsed" data-ng-show="node.'+i+'.length && node.collapsed" data-ng-click="'+e+'.selectNodeHead(node)"></i><i class="expanded" data-ng-show="node.'+i+'.length && !node.collapsed" data-ng-click="'+e+'.selectNodeHead(node)"></i><i class="normal" data-ng-hide="node.'+i+'.length"></i> <span data-ng-class="node.selected" data-ng-click="'+e+".selectNodeLabel(node);"+e+'.selectNodeHead(node)">{{node.'+h+'}}</span><div data-ng-hide="node.collapsed" data-tree-id="'+e+'" data-tree-model="node.'+i+'" data-node-id='+g+" data-node-label="+h+" data-node-children="+i+"></div></li></ul>";e&&f&&(d.angularTreeview&&(b[e]=b[e]||{},b[e].selectNodeHead=b[e].selectNodeHead||function(a){a.collapsed=!a.collapsed},b[e].selectNodeLabel=b[e].selectNodeLabel||function(a){b[e].currentNode&&b[e].currentNode.selected&&(b[e].currentNode.selected=void 0),a.selected="selected",b[e].currentNode=a}),c.html("").append(a(j)(b)))}}}])}(angular);
Awesome solution man! Thanks.
could you possibly post th un-min version? I would like to learn from this but I can't find where you made the change.
@eviltek2099 you can open the code and simply beautify it in atom or any online service.
Hi there, How do I expand tree nodes while clicking on the text instead of folder icon.
@eu81273