As per my understanding, Angularfire2 returns a Promise < void > whenever a query runs successfully(except fetch when it returns data).
Functionality:
I have a application where when a item is saved a function is called inside which if the set query is run successfully(i.e it receives a Promise< void >) it navigates to the previous page. It works perfectly when app is online but the app also needs to work offline. I have enabled persistence and configured service workers for the same
Issue
But when offline the code after the query returns a Promise is not called.So what should be the expected logic or behaviour during offline.
this._itemService.setItem(item).then(()=>{
const message = item.name + saveMessage;
this.snackBar.open(message," ",{duration:2000});
this.location.back();
}