简体   繁体   English

多级角度js下拉列表

[英]multilevel angular js dropdown

Im using the dropdown angularjs-dropdown-multiselect . 我正在使用下拉angularjs-dropdown-multiselect But it has only a single level dropdown. 但它只有一个级别的下拉列表。 This can be used to show the following response. 这可以用来显示以下响应。

[
    { id: 1, label: 'Facility 01' },
    { id: 2, label: 'Facility 02' },
    { id: 3, label: 'Facility 03' },
    { id: 4, label: 'Facility 04' },
    { id: 5, label: 'Facility 05' },
    { id: 6, label: 'Facility 06' },
    { id: 7, label: 'Facility 07' },
    { id: 8, label: 'Facility 08' },
];

But what i need is a multilevel dropdown to show the followind response in the dropdown. 但是我需要的是一个多级下拉列表,以显示下拉列表中的followind响应。

[
  {
    "id": 8,
    "label": "AA",
    "items": [
      {
        "id": 9,
        "label": "BB",
        "items": [
          {
            "id": 10,
            "label": "DD",
            "items": []
          }
        ]
      },
      {
        "id": 11,
        "label": "CC",
        "items": []
      }
    ]
  }
]

I want to display the above response using angularjs-dropdown-multiselect . 我想使用angularjs-dropdown-multiselect显示以上响应。 Can anyone help me with this? 谁能帮我这个? Thanks 谢谢

You can find solution for you question here. 您可以在此处找到问题的解决方案。 plnkr.co/edit/gHzV9d?p=preview plnkr.co/edit/gHzV9d?p=预览

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM