如何在Angular中创建层次树
我有列表的要求,当单击每个列表时,它应该加载API,并且需要绑定单击该列表的另一个列表。因此,这应该发生在所有列表中。在Angular中完成此分层树列表的最佳方法是什么?
示例:
- List1
- 儿童1
- ChildChild1
- ChildChildChild1
- ChildChildChildChild1
- ChildChildChild2
- ChildChildChild1
- ChildChild2
- ChildChild1
- child2
- child3
- 儿童1
- list3
- list3
- list4,
因此list1的同一列表中的所有列表2,list3和list4等列表都应发生。仅当我们单击父列表时,儿童列表才应加载。欣赏Stackblitz示例。谢谢
I have the requirement that is list and when clicking each list it should load API and need to bind another list inside the which one is clicked. So this should happen for all list. What is the best way to do this hierarchal tree list in angular.
Example :
- list1
- child1
- childchild1
- childchildchild1
- childchildchildchild1
- childchildchild2
- childchildchild1
- childchild2
- childchild1
- child2
- child3
- child1
- list2
- list3
- list4
So the same of list1 should happen for all list like list2, list3 and list4. The child list should load only when we clicking the parent list. Appreciate with stackBlitz example. Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论