Pregunta

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?

¿Fue útil?

Solución

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)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top