angular - AngularFire2 how to use your own custom key instead of the auto generated one -
currently using:
this.af.database.list('users').push(user);
how can make key of object submitted custom. want able set node of object same uid of registered user. have access id need able know how make custom user objects node not auto generated id when pushing.
thanks
use method below angularfire2
addcustomkey (key, value) { const tosend = this.af.database.object(`/users/${key}`); tosend.set(value); }
Comments
Post a Comment