angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

How do we use angularfire2, upon saving/pushing data, to generate Firebase unique id?

Open jek-bao-choo opened this issue 10 years ago • 21 comments

I'm aware that using Firebase REST we could POST and have a Firebase unique id generated. For example, a id that looks like this, -Kbz13Uo3.

  1. How do we do this using AngularFire2?
  2. Or maybe should we be asking is there a need to use Firebase Unique Id in the first place?
  3. What is a good self generated unique id when using it with Firebase? GUID?

jek-bao-choo avatar Jun 01 '16 12:06 jek-bao-choo

hi, How can i edit the firebase data using $key

this is my new data from firebase

-KXxxQxJCdo0pidJI1ay EMAIL:

FIRSTNAME:john

LASTNAME:david

MOBILE: 654656767

I cannot get the data from firebase when using firebase object $key-->-KXxxQxJCdo0pidJI1ay

kindly advice me

Thanks & regards

store key value in object user this.firebase.object('/Users/' + user.$key) .update({ username: user.username,email:user.email});

Shashidhar1998 avatar Feb 20 '20 12:02 Shashidhar1998