Skip to content

feat(database): add option to include key on valueChanges() #2126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 11, 2020

Conversation

sarunint
Copy link
Contributor

@sarunint sarunint commented Jul 4, 2019

Checklist

  • Issue number for this PR: Retrieving list data with items id #1562 (required)
  • Docs included?: not yet
  • Test units included?: no? (original code has no test???)
  • In a clean directory, yarn install, yarn test run successfully?: yes

Description

The RTDB version of #1976. Why should only Firestore have the fun?

Code sample

All of the following are valid.

this.afd.list('path').valueChanges();
this.afd.list('path').valueChanges(undefined, {idField: 'key'});

Caveats

Currently, if the list is an array of primitive types, it would not work. Please advise on how I should proceed.

@jamesdaniels jamesdaniels added this to the 5.3.0 milestone Aug 20, 2019
@jamesdaniels jamesdaniels modified the milestones: 5.3.0, 6.1 Nov 10, 2020
@jamesdaniels jamesdaniels merged commit 5cdb8ce into angular:master Nov 11, 2020
@sarunint
Copy link
Contributor Author

@jamesdaniels Whoa, I've already forgotten about this pull request 😂😂😂

@jamesdaniels
Copy link
Member

Made it into 6.1.0-rc.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants