realtime firebase database : How to check if document exists
this.realtimedbService.getOneItem(key, 'colection').valueChanges()
.subscribe(
result => {
if (result === null) {
console.log('NOT EXIST');
}
if (result !== null) {
console.log('EXIST');
}
},
error => {
console.log(" EE : ");
console.log(error);
}
);