Displaying Tree view using Angular2

You need create a component that replies itself. So first thinking in data. You generally has an array of objects. This objects will have almost two properties “item” and “children”. “children” can be null or an object of the same type. ok?

 item1
   item1-1
      item2-1,
      item2-2
   item1-2
 item2
 item3
    item3-1
    item3-2
       item3-2-1

How you want to create?

To display them, you can use a component that replies itselft like angular 5 display nested questions and answer show item under it parent item

Browse More Popular Posts

Leave a Comment