Sorting on itemController's property doesn't work


This one is quite annoying. Am I doing something wrong or is it a bug or limitation in Ember? I cannot sort on properties defined in itemController. Example:

App.FooBarsController = Ember.ArrayController.extend({
    itemController: "fooBar",
    sortProperties: ["total"]

App.FooBarController = Ember.ObjectController.extend({
    total: Ember.computed.alias("nestedObjects.length")

Then in handlebars I tried all of the following without any success:

{{#each controller}}
{{#each arrangedContent}}
{{#each itemController="fooBar"}}
{{#each controller itemController="fooBar"}}
{{#each arrangedContent itemController="fooBar"}}

Any ideas?



For now, use Ember.computed.sort


Wasn’t aware of Ember.computed.sort. That should do the job. Thanks!