I have Angular + Firebase app. In one of my components i get elements from Firebase DB and binding them into template with *ngFor:
<div *ngFor="let comment of (comments | async)>
<div>{{ comment.text }}</div>
</div>
But every comment
also have answers
list:
How can i bind answers inside my loop, for example, something like this:
<div *ngFor="let comment of (comments | async)>
<div>{{ comment.text }}</div>
<div *ngFor="let answer of comment.answers">
{{ answer.text }}
</div
</div>
This structure does not work and return error:
Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.