angular - Angular: List view from multidimensional array
问题描述
I have following data structure:
{
'TeamLead': 'Andrew',
'subordinate': [{
'Name': 'Daniel',
'subordinate': [{
'Name': 'Steve',
'subordinate': [{
'Name': 'Steve',
'subordinate': [{
'Name': 'Joe',
}
]
}
]
}
]
}
]
}
I have to show all subordinates list under team lead in Angular, similar to this and dimension of array is not fixed one :
Please help.
解决方案
您应该使用Angular 材质树结构来显示这些。
这是一个非常简单易用的库。
推荐阅读
- sql - 关于 SQL group by 和 have 的面试问题
- cassandra - 基于提供的 JSON,如何对 Cassandra 表进行建模
- spring - 使用两个用于移动和 Web 的 azure AD 应用注册
- php - 如何从具有不同字段的数据库表中生成特定字段的嵌套关联数组?
- visual-studio-2017 - 面向 Windows 10 的 KMDF 驱动程序,不使用 VS 2017 在 Windows 7(SP1) 上构建
- c++ - 不确定如何修复;非静态成员引用必须相对于特定对象
- python - 从列表中存在的数据框列中的字符串中提取前缀
- python - Kivy 导航控制
- sql-server - 如何在 SQL 中应用 AND 运算
- postgresql - 有没有办法继承当前用户不拥有的表