현재 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');
});
하지만 난이 발생 오류가없는 내 인터넷 연결을 해제해도. 누군가가 푸시가 성공적이지 않은 경우 오류를 처리 할 수있는 방법을 알고 있습니까?