Frage

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?

War es hilfreich?

Lösung

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)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top