Skip to content

Get the key of item pushed onto a list #366

@jongood01

Description

@jongood01

There was a closed issue for this #199 but changes in the push method mean the answer no longer works.
I am trying to do something like this but value is a promise and using preserveSnapshot on the list doesn't seem ideal:

const mylist = af.database.list('myFirebasePath');
const promise = mylist.push({key: val}).then((value) => {
console.log(value.$key);
} );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions