

upDateMeetUp(meetup: Meetup): Observable < any > | Promise < any > | any {
console.log(meetup.$key);
return this.meetups.update(meetup.$key, meetup);
}
I don't know what cause this as key and path are right.
I konw why..... I didn't remove the $key..
@jerry-i , Please can u explain by removing the $key. Thanks
delete (meetup.$key)
Do you mean you did not delete $key in meetup? WHy is this needed? I have same problem now. @jerry-i
me too :(
@jerry-i @BernardMarieOnzo I see only one reason: there is $key property in the firebase db in each item of the list. So, what should firebase do when somebody is trying to update $key prop? This can be the reason.
only because the second param will overwrite all prop but just not this $key, $key is just firebase index.
Oh I just re-read the error message:
Keys must be non-empty strings and can't contain ".", "#", "$"
I just realized that this is about keys of object which I pass as 2-nd argument =) I accidently thought that it is about key which I pass as 1st argument.
const $key = obj.$key
delete obj.$key
update($key, object)
Ye ye. I understand how to delete prop :) :+1:
I just surprised that I understood error message wrong.
const $key = obj.$key
delete obj.$key
update($key, object)
I do not understand, please help.
@johnjiea What do you not understand?
You have err in your code:
const $key = obj.$key
delete obj.$key
update($key, object); // <--- update($key, obj);
@jerry-i thanks it worked for me.
Most helpful comment