I have a simple *ngFor loop and I cannot figure out why it's throwing an error
<ion-list>
<ion-item *ngFor="let comment of [{'employee': 'jeremy lopez', 'desc': 'blah blah blah'}]">
<ion-avatar item-left>
<div class="initial-container">
<div class="flex justify-content-center align-items-center">
<div>{{ comment.employee }}</div>
</div>
</div>
</ion-avatar>
<p>{{ commment.desc }}</p>
</ion-item>
</ion-list>
this throws an error TypeError: Cannot read property 'desc' of undefined even though it's clearly defined. When I move the {{ comment.desc }} up a couple lines in the DOM, it works:
<ion-item *ngFor="let comment of [{'employee': 'jeremy lopez', blah: 'blah blah blah'}]">
<ion-avatar item-left>
<div class="initial-container">
<div class="flex justify-content-center align-items-center">
<div>{{ comment.employee | initialFormat }}</div>
<p>{{ commment.desc }}</p>
</div>
</div>
</ion-avatar>
</ion-item>
which is great and all, but I need to be able to access comment.desc outside the <div class="initial-container"></div>.
Can someone explain what's happening?