1👍
✅
It’s the context, use arrow functions Or store value of context (this
) above confirm dialog and use the reference.
dialogs.confirm("Delete ?").then((result) => {
if (result) {
console.log("in deleting: " + result);
// delete item
this.contacts.splice(this.contacts.indexOf(actItem), 1);
// add to ASStore as new array
appSettings.setString("ASStore", JSON.stringify(this.contacts));
}
});
Source:stackexchange.com