如何在Angle 6中设计Mat-tree结构

时间:2019-05-09 09:31:54

标签: angular angular6

我需要按角度设计树结构视图。并且,如何在mat-tree中相对于子节点显示父节点。并且,选中所有父子节点中的复选框。如果检查父节点或子节点,则检查是否为真

下面的“我的树”视图数据..


var entries = [
  {
    "Id": 0,
    "Code": null,
    "Role Id": 1,
    "Page Id": false,
    "View": false,
    "Add": false,
    "Delete": false,
    "Role Name": "admin",
    "Page Name": false,
    "Pages": [
        {
            "Id": 1,
            "Code": null,
            "Name": "Masters",
            "Parent Id": 0,
            "Active": true,
            "View": false,
            "Add": false,
            "Delete": false
        },
        {
            "Id": 2,
            "Code": null,
            "Name": "Agents",
            "Parent Id": 1,
            "Active": true,
            "View": false,
            "Add": false,
            "Delete": false
        },

    ]
}
  ]

0 个答案:

没有答案