samedi 21 novembre 2015

Sorting array based on ember-data belongsTo Relationship

How do I sort based on a relationship?

  sortProperties: ['employee.name:asc']
  sortedModels: computed.sort('models', 'sortProperties'),

Essentailly, I have a belongsTo('employee') on each element in the models array and would like to sort based on the name.

The above does not work, is this possible?




Aucun commentaire:

Enregistrer un commentaire