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

Popular posts from this blog

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -