We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ce98ff commit 3cee34fCopy full SHA for 3cee34f
docs/version-5-upgrade.md
@@ -41,13 +41,8 @@ constructor(afDb: AngularFireDatabase) {
41
### 5.0
42
```ts
43
constructor(afDb: AngularFireDatabase) {
44
- afDb.list('items').snapshotChanges().map(action => {
45
- const arr = [];
46
- action.forEach(e => {
47
- const $key = e.key;
48
- arr.push({ $key, ...e.payload.val() });
49
- });
50
- return arr;
+ afDb.list('items').snapshotChanges().map(actions => {
+ return actions.map(action => ({ $key: action.key, ...action.payload.val() }));
51
}).subscribe(items => items.forEach(item => console.log(item.$key)));
52
}
53
```
0 commit comments