Angular 6-选择选项-树形结构

时间:2019-05-31 15:06:41

标签: angular

我正在寻找专门用于Angular 6+或Angular Material的选择选项,以支持“选择”选项中的“树状结构”。

我要在选择框中表示的数据如下。

{
"name": "Automobile",
"id": 1,
"childrens": [
  {
    "name": "Fuel",
    "id": 10,
    "childrens": null
  },
  {
    "name": "Insurance",
    "id": 11,
    "childrens": [{
                "name": "rent",
                "id": 25,
                "childrens": null
              },
              {
                "name": "household",
                "id": 26,
                "childrens": null
              }]
  },
  {
    "name": "Maintaince",
    "id": 12,
    "childrens": [{
                    "name": "appliance",
                    "id": 24,
                    "childrens": null
                  },]
  },
  {
    "name": "Tax",
    "id": 13,
    "childrens": null
  },
  {
    "name": "Loan",
    "id": 14,
    "childrens": null
  }
]

}

我见过选项Ngx Tree Select,但它适用于Angular 4.0 <6.0。

适用于Angular 6吗?

0 个答案:

没有答案