I’m building a Cordova chat app, and I’m having an issue with displaying images. My simplified template looks like this:
<template name="Messages_Index">
<div class="list">
{{#each messages}}
<div class="message-wrapper">
{{#if image type}}
<img src="{{content}}">
{{else}}
<p>{{content}}</p>
{{/if}}
</div>
{{/each}}
</div>
</template>
Everything works fine, however, if the connection is bad, the images take awhile to load, rendering an empty chat bubble to the DOM without anything inside until the image loads.
Is there a way to delay appending the message until after the image loads?