I use a model in Ember.js like this:
App.SomethingRoute = Ember.Route.extend({
model: function()
{
return App.MyData.find();
}
});
It receives data from MyData. In my data i have a field called "NAME". I would like to display data from MyData in ascendant order by NAME.
I've added a controller (thx. Toran, intuitive) like this:
App.SomethingController = Ember.ArrayController.extend({
sortProperties: ['NAME'],
sortAscending: true
});
But my template that is like this:
{{#each model}}
{{NAME}}
{{/each}}
Still shows unordered list. How to make it right?