首页 > 解决方案 > 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 :

enter image description here

Please help.

标签: angularmultidimensional-array

解决方案


您应该使用Angular 材质树结构来显示这些。

这是一个非常简单易用的库。


推荐阅读