lundi 8 juin 2015

How do I sort a {{#each}} within an ember component

I have a list within a {{#each}} {{/each}}. How would I sort this list in an ember component?

components/conversations-list.hbs

{{#each model as |conversation|}}
{{conversations-item userName=conversation.contact.userName lastConversationTime=conversation.lastConversationTime profilePictureUrl=conversation.contact.profilePictureUrl id=conversation.id}}
{{/each}}

How would I sort this list by lastConversationTime?




Aucun commentaire:

Enregistrer un commentaire