eu81273 / angular.treeview

AngularJS based Treeview (no jQuery)
MIT License
405 stars 223 forks source link

Collapse tree using button #29

Open otoja opened 10 years ago

otoja commented 10 years ago

Hi, Can someone tell me, what is the nicer way to collapse the tree (each node) on button click?

For now I'm using something like:

$scope.collapseTree = function(){
    $scope.nodeList.forEach(function (node){
         node.expanded = false;
    });
};

But I am not sure if this is the best option. Thanks, Kamila