目前我開發了一個與Firebase數據庫通信的Ionic2應用程序。在更新節點時,它有時會起作用,有時卻不起作用。 所以我累了用下面的代碼處理錯誤:檢查推送是否成功 - angularfire2
this.db.list("/Events/" + this.eventID+ "/teilnehmer").push(this.userID)
.then(resolve => {
console.log('success');
}, reject => {
console.log('error');
})
.catch(reject => {
console.log('catch');
});
但是,即使我斷開我的Internet連接沒有拋出錯誤。 是否有人知道我如何處理錯誤,如果推不成功?