Embarking on my Angular JS journey, I have begun creating custom directives for a project. As part of the task, I needed to generate an angular tree and found a code snippet on a plunkr sample by someone else. Although it is not originally my code, I tried to expand upon it.
My challenge lies in calling a controller method with arguments from the directive. Despite exploring solutions on stack overflow, I have been unable to resolve the issue I am currently facing. It appears that somewhere in the recursive calling, I have made a mistake that results in the controller method being called with an undefined argument. Below is the plnkr code I have been working with.
http://plnkr.co/edit/76iQdnLQyu4k9cn4eId5?p=preview
Your assistance with this matter would be greatly appreciated.
Thanks, veera