dimanche 5 juin 2016

Ember : sortBy or Ember.computed.sort

I saw an example of Ember sortBy somewhere which goes like:

model.sortBy("time").reverse().sortBy("place")

It was working, but am not sure if this is a good way to do that. Would the below a better fit for this. If yes, why.

sortOptions: ['time:desc','place']
Ember.computed.sort('model',sortOptions)




Aucun commentaire:

Enregistrer un commentaire