AngularJS TreeView Populate Child Node When Click On Parent Node

Tan Woon How

He is a learner and know little around .Net and Java. He learned and share if you see his mistake... feel free to comment and laugh at him... and also please help to correct him.

You may also like...

  • karthik

    Hi Nice article on tree view it was really helpful. In my requirement we have to keep only one node expanded at a time. Could you help me if we can achieve this.Thanks

    • Tan Woon How

      Hi Karthik,
      Thanks for you cooperation. Intention of this blog is to help others so if we share question/problem in comment section that could be benefit other readers.

      Answer from our facebook chat:
      You could use this syntax before any expanding occur but as you could see it collapseRecursive will could hurt you if the treeview leaf is huge. So use it wisely πŸ™‚
      ivhTreeviewMgr.collapseRecursive(root);

      Edited demo for you request
      https://plnkr.co/edit/zPF2P6UbHLE6GKtgixuy?p=preview

      Cheers.