Given a tree how to initialize it in such way that the nodes are expanded at will?
tree
I already tried to get a reference with @ViewChildren(Tree) tree
@ViewChildren(Tree) tree
You can handle this with a function that put all the expanded attributes to true.
expandAll(toggle: boolean) { this.tree.map(node => { node.expanded = toggle; }); } ngOnInit() { setTimeout(()=>{ this.expandAll(true); }, 0); }