I have this Firestore structure:
Category: {
document1a: {
name : "reptiles"
animalsubcollection: {
Document1b: {
name: "snake"
color: "white"
}
Document2b: {
name: "lizard"
color: "black"
}
document2a: {
name : "mammals"
animalsubcollection: {
Document1b: {
name: "monkey"
color: "brown"
}
Document2b: {
name: "cat"
color: "white"
}
I need to list that information in a single page, classified by category like this:
Reptiles:
- Snake: White
- Lizard: Black
Mammals:
- Monkey: Brown
- Cat: White
Like the example above I always have just one known subcollection called animalsubcollection
.
How I can achieve this using AngularFire2 in Angular 5?
If it's not the best firestore model for this kind of information, I can change it if necessary. I accept others suggestions to achieve the same result.