I have a list of elements in an ngFor loop. When I refresh the page, only the first elements data is loaded. When I click an empty element the data suddenly pops up. This happens only when viewed in Safari. How can I get Safari to load all content?
<article *ngFor="let item of list; let i = index">
<section class="item__content">
<h3 class="item__name">
<a href="#">{{item.name}}</a>
</h3>
<p>
{{item.description}}
</p>
</section>
</article>
Data comes from an API which's serves JSON.
After a lot of trial and error my problem was a |date pipe that was missing a specific format.
<time>{{topic.lastPostAt|date}}</time>
Changing it to this solved it for me:
<time>{{topic.lastPostAt|date:"MM/dd/yy"}}</time>
My example code on StackOverflow was missing this though. For some reason Safari was only able to render the content when a user event was triggered.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With