wix-incubator / angular-tree-control

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

$Path function accesible on filter-expression #275

Open aitorMolinuevo opened 7 years ago

aitorMolinuevo commented 7 years ago

Hi all!

I am trying to use $Path inside my treecontrol. My code looks like the following:

<treecontrol class="tree-light" tree-model="vm.finalTreeData" on-selection="showSelected(node)" options="vm.treeOptions" filter-expression="vm.filter()" filter-comparator="vm.comparator" on-node-toggle="vm.showToggle(node, expanded, $parentNode, $index, $first, $middle, $last, $odd, $even, $path)">

I want to filter all nodes whos first dad is a String passed by parameter. The only way I have found is getting the path of the node a look if the passed string is in it? Anyone knows the way to achieve this?

Thanks in advance!