Listing real time firebase database content


#1

Hello guys,
Currently i have the following structure:

I am trying to list the categories then all the items in those categories, the list has to be grouped by the categories.

ts:

> this.firebasedb.list("/tavak/").subscribe(_data => {
>       
>       this.toadatok = _data.filter(item => item.approved == "1");
>       
> 
>     })
>   }

html
<ion-content>
    <ion-list>
        <ion-item-group *ngFor="let item of toadatok; let i = index">
          <ion-item-divider color="secondary">{{item.$key}}</ion-item-divider>
          <button *ngFor="let c of toadatok ion-item>
            {{c.nev}}
          </button>
        </ion-item-group>
      </ion-list>
</ion-content>

My main problem i can list the category name but cant go though the object in the categories.See the console log below


#2

You can try this.firebasedb.list("/tavak/"+"category_name") and will return the items inside of that category.


#3

yes but i need to list all the categories in my page not just the content of one category.
Console log:
Képkivágás


#4

Added new info,i list all the objects (categories) in my db, but now i have to list the objects in those categories in a grouped list