I'm using AngularFire2, trying to get lists out of lists. A nested *ngFor within an *ngFor doesn't show on the view...
app.componnent
...
constructor(private _af: AngularFire) {
this.lists = this._af.database.list(this._API_URL);
}
...
app.component.html
<div *ngFor="let list of lists | async">
{{sublist.name}}<br/> <!-- I can see you -->
<!--******* I can't see you **********-->
<div *ngFor="let rootword of list.rootwords">
{{rootword.word}} {{rootword.total}}
</div>
</div>
Example of Firebase
maindb
|_list1
| |_name: 'List 1"
| |_rootwords
| |_apple
| | |_word: 'apple'
| | |_total: 4
| |
| |_banana
| | |_word: 'banana'
| | |_total: 2
| |_carpet
| | |_word: 'carpet'
| | |_total: 21
|
|_list2
|_name: "List 2"
|_rootwords
|_elephant
| |_word: 'elephant'
| |_total: 4
|_sloth
|_word: 'sloth
|_total: 5
How do you nest an ngFor in an ngFor with firebase.list ?? Do I need to map or filter? Does AngularFire2 have a way to convert the inner object to an array?
All suggestions appreciated!