I have a set of two directives that call each other recursively to render a tree structure.
I need to pass a controller function reference to those directives so in turn, they need to pass each other that reference. It seems to work except for the parameters.
Passing the reference to the directive:
<item-list items="data" functionreference="controllerfunction(name)"></item-list>
Passing the reference between directives:
<item-list items="item.children" functionreference="functionreference(name)"></item-list></li>
Calling the function:
$scope.functionreference({name: name});
What would be the proper way to declare and pass the function reference?