async addTransaction() {
this.ref = this.db.list('transactions', ref => ref.orderByChild('month'));
this.ref.push(this.transaction).then(() => {
this.transaction = {
value: 0,
expense: false,
month: 0,
};
let toast = await this.toastCtrl.create({
message: 'New transaction has been added!',
duration: 3000
});
return await toast.present()
});
}
It tells me that await has to be inside an async function and it is. I don’t know what the issue is