I am trying to implement ng2 smart table to handle my pivot tables but I ran into the following confusion: Add custom actions for each record in the table and I have to make it so that when I click on that action I execute a function which I can't find how to do.
custom actions
actions: {
custom: [
{
name: 'editAction',
title: '<i class="nb-edit"></i>',
},
{
name: 'deleteAction',
title: '<i class="nb-trash"></i>'
}
],
position: 'right',
add: false,
edit: false,
delete: false
}
Html
<nb-card-body>
<ng2-smart-table [settings]="settings" [source]="source">
</ng2-smart-table>
</nb-card-body>
You can do like this :
Custom actions: (in ts file)
Confirm methods : (in ts file)
HTML: