i'm pretty new to angular and I'm in the process of building a small web app.
I've managed to setup angularfire 2 and successfully managed to create a new list entry using Push().
Let's say my list (users) consists user email and first name. only the email is added via the Push method and i want to update that record by adding first name.
I referred to the Angularfire2 documentation and managed to get this far:
usrEmail: string; usrData: AngularFireList<any>; usr: Observable<any>; constructor( private authService: AuthService, private afd: AngularFireDatabase) { this.usrData = this.afd.list('/users') // now get the current user this.usr = this.usrData.snapshotChanges().map(changes => { return changes.map(c => ({ key: c.payload.key, ...c.payload.val() })); }); } I'm not sure how i should filter the list by the usrEmail and obtain the key to update the record.
Any help pointing me at the right direction is much appreciated.