mercredi 24 février 2016

Emberjs Sort records

I want to sort the records that I'm getting by date in descending order.

//model definition
export default DS.Model.extend({
   name: DS.attr('string'),
   mydate: DS.attr('number')
}

I tried return this.store.findAll('mymodel').sortBy('mydate') but no success. I'm using version 2.3.0.




Aucun commentaire:

Enregistrer un commentaire