0

I have the following problem and do not know how to solve it:

I have a list of items in the ng-repeat for each item need to add a combobox cascade, for example: for the item 1 to I have the first combobox with category 1, when I select a category should appear subcategories of the combobox 1(category 1), but the creating of the combobox should be dinamic, without know the quantity of the combobox that go to create for eatch items of the ng-repeat. Something like this:

enter image description here

Floern
  • 33,559
  • 24
  • 104
  • 119

1 Answers1

0

This Answer might help you, all you would really have to do is make sure that all of the nested items are named the same.

Recursion in Angular directives

And as example JSON object would be

{ name: 'parent1', 
  children: [{name: 'child1', 
              children: [{ name: 'child1a'}]},
             {name: 'child2', children: []}]
},
{ name: 'parent2', children: [] }

then make the recursion on the children property array

Community
  • 1
  • 1
Delta
  • 869
  • 6
  • 12