Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
openActionSheet(todo: Todo) {
ons.openActionSheet({
cancelable: true,
title: 'Do you want to delete this item ?',
buttons: [
{ label: 'Delete', icon: 'md-delete', modifier: 'destructive' },
{ label: 'Cancel', icon: 'md-close' }
],
}).then((i: number) => {
switch (i) {
case 0:
this.delete(todo);
break;
default:
break;
}
});
}