There is no multi-position push, but since push IDs are generated on the client, you can use the update with multiple locations to do what you want.
You can create a push id by calling push with no arguments. Push identifiers are generated on the client, and the generation of one of them is not related to the interaction with the database:
let key = firebase.database().ref().push().key;
You can also use AngularFire2 for this; although you need to pass the argument ( undefined ) to push to calm TypeScript:
let key = angularFire.database.list('').push(undefined).key;
Once you have generated the key, you can create an update with several locations:
let obj = { some: 'object' }; angularFire.database.object('').update({ [`a/path/${key}`]: obj, [`another/path${key}`]: obj });
The update is atomic, so either all paths will be updated or not.
source share