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 9039fc4 commit 8ce98ffCopy full SHA for 8ce98ff
docs/version-5-upgrade.md
@@ -41,11 +41,14 @@ constructor(afDb: AngularFireDatabase) {
41
### 5.0
42
```ts
43
constructor(afDb: AngularFireDatabase) {
44
- afDb.object('items').snapshotChanges().map(action => {
45
- const $key = action.payload.key;
46
- const data = { $key, ...action.payload.val() };
47
- return data;
48
- }).subscribe(item => console.log(item.$key));
+ afDb.list('items').snapshotChanges().map(action => {
+ const arr = [];
+ action.forEach(e => {
+ const $key = e.key;
+ arr.push({ $key, ...e.payload.val() });
49
+ });
50
+ return arr;
51
+ }).subscribe(items => items.forEach(item => console.log(item.$key)));
52
}
53
```
54
0 commit comments