jeudi 17 décembre 2015

sortBy descending in Ember property

I'm sorting a collection that is a computed property in my model:

collection: function() {
  var entries = this.get('entries');
  return entries.sortBy('prop1', 'prop2');
}.property('entries.@each.prop1', 'entries.@each.prop2')

But I can't figure out how to get it to sort descending. That should be easy, right?

Ember 1.13




Aucun commentaire:

Enregistrer un commentaire