arvindr21 / jsTree-directive

An Angular Directive for jsTree. Docs :
http://jstree-directive.herokuapp.com/
51 stars 33 forks source link

Select a node inside the controller #30

Open hmendezm opened 8 years ago

hmendezm commented 8 years ago

So sorry. This is not an issue but I do not know where to put this kind of questions.

What I try to do is to select a specific Node in the tree using a function inside the controller so.

$scope.SelectNode = function() { var item = _.findWhere($scope.treeData, { id : $scope.selectedNodeId } ); //And Here I need to select the node in the tree so the user knows what s/he is looking at. Samething like item.select =true. };

I try to use $scope.treeData.jstree("select_node", $scope.selectedNodeId); but it is not working I get the error TypeError: $scope.treeData.jstree is not a function

I really need help! Best Regards Henry