目前我开发了一个与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连接没有抛出错误。 是否有人知道我如何处理错误,如果推不成功?