This is my code in a minimal form:
<div>
{{ 'This is all comments Array =>'}}<br>
{{selectedPost.comments}}
<div *ngIf="!commentsLoading" *ngFor="#comment of selectedPost.comments">
{{ 'This is comment Object => ' + comment }}
</div>
</div>
The comments is an array which has 5 objects outside the *ngFor
. It iterates 6 times inside the loop and the last index becomes null.
Output
Edit
Console
Does anyone know what's happening?