I am working on an Angular component that shows a list of items.
I want each item in the list to have a set of menu buttons that trigger different functions in the parent component/controller.
Is there a way to create a component binding that accepts an array like this:
[
{Name: 'Edit', Callback: editItem(item)},
{Name: 'Delete', Callback: deleteItem(item)},
{Name: 'Add', Callback: addItem(item)},
]
Then I can use an ng-repeat in the component template to display the buttons with their respective click actions.
I attempted to set up the binding as follows, but it doesn't appear to be working:
binding = {
actions: '&'
}