Question

I am looking at the angular treeview (https://github.com/eu81273/angular.treeview) How to show/hide the children in the tree?Or do I just need to bind to a different model?

Was it helpful?

Solution

It looks like each node can have a boolean property called collapsed that determines whether or not its children are shown.

For example, you can collapse the second child node of the root node like this...

treeList[0].children[1].collapsed = false;

Fiddle (simplified version of one of their samples)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top