I have question, what should I do to make sorting working in Ember app? I created simple blog app via ember-cli
Model:
export default DS.Model.extend({
title: DS.attr('string'),
publishedAt: DS.attr('date'),
description: DS.attr('string'),
body: DS.attr('string')
});
Route structure is:
this.resource('blog', function() {
this.route('new');
...
});
And in blog/index I have {{#each blog in model}}
looping for all data
I added controller blog/index
import Ember from 'ember';
export default Ember.ArrayController.extend({
sortAscending: true,
sortProperties: ['date']
});
And nothing seems to work..