-
Notifications
You must be signed in to change notification settings - Fork 2.2k
-
I am working with Angular and Firebase's Real Time Database. I am currently following the AngularFire documentation and am retrieving data as lists. I can't seem to figure out how to get a nested list from within a list.
Here is an example of my Firebase RTDB structure:
- items
- Item 1
- age: 22
- personality
- temperament: "happy"
- Item 2
- age: 34
- personality
-temperament: "angry"
I would like to be able to access the temperament
value to update or retrieve. This is in items/Item1/personality/
. By following the documentation I have linked above, I am able to access up to items/Item1/
but cannot figure out a way to go beyond that. I have seen some solutions suggesting to use the forEach()
function but could not find any documentation to help guide me.
I have also noted that the documentation linked above uses the async pipe method, which I believe automatically sorts out the subscription. Currently, I am subscribing to the observables myself within the app.component.ts
file rather than using the async pipe method. This is working, however, only up to the first level. I am looking to learn how to be able to access the child nodes and more.
Any help would be appreciated!
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1