AngularJS中的DecisionTree选择器

时间:2014-09-25 20:04:03

标签: angularjs decision-tree dropdownbox multipleselection

我正在尝试找到一种在angularjs中创建多级决策树选择器的智能方法。所以,基本上我要找的是: 如果我选择Maingroup" GroupA"从下拉列表中,我只能看到subgroup1中与GroupA相关的属性。 subgroup1也应该是一个下拉列表。然后,通过另一个下拉列表优化选择,应该仅显示基于Maingroup + Subgroup1的可能选择。 最后,应显示该值。

[{"Maingroup":"GroupA","Subgroup1":"subgroupA1","Subgroup2":"subgroupA21","Value":11.34},
{"Maingroup":"GroupA","Subgroup1":"subgroupA1","Subgroup2":"subgroupA22","Value":40.7},
{"Maingroup":"GroupA","Subgroup1":"subgroupA2","Subgroup2":"subgroupA23","Value":58.23},
{"Maingroup":"GroupA","Subgroup1":"subgroupA2","Subgroup2":"subgroupA24","Value":20.64},
{"Maingroup":"GroupA","Subgroup1":"subgroupA2","Subgroup2":"subgroupA25","Value":74.77},

我在github上放了一个截图和json文件。 谢谢,欢迎提出任何建议。

1 个答案:

答案 0 :(得分:0)

看看angular-ui-tree connected trees demo。该结构可以重复使用以实现您的目标。