Changes to make the tree dynamic using angular