I am currently working on a custom dropdown menu directive that allows the attachment of functions to each item in the list. While I know how to pass one function per attribute into the directive, I am curious if there is a way to pass multiple functions instead.
<dropdown items="['item1', 'item2']" actions="['action1()', 'action2()']"></dropdown>
Alternatively:
<dropdown items="[{'item1':action1()}, {'item2':action2()}]"></dropdown>
This would allow for:
<dropdown items="['item1', 'item2']" actions="['action1()', 'action2()']">
<a ng-click="action1()">item1</a>
<a ng-click="action2()">item2</a>
</dropdown>