0

I'd like to generate dynamic html for my treeview (angular-ui-tree). The problem is as follows: I've got a json with a number of nested objects, and I have HTML that uses angular-ui-tree directives to create the tree. I have to hardcode the html at the moment to reflect the complexity of my json, but I can't know it in advance.

I have a method that gives me integer for the depth of my json, and an element I'd like to repeat, but every time I repeat it it will be appended inside of the previous element.

How can I do this from within a directive so that Angular is happy about me appending another directive dynamically like that?

Is there a better way to do this?

user841760
  • 361
  • 1
  • 3
  • 14

1 Answers1

0

Ok, so if you clone the repo and see examples, there's a template that does that.

user841760
  • 361
  • 1
  • 3
  • 14