这有效:
{{#each basicColours itemController='colour'}}
ColoursController = Ember.ArrayController.extend({
itemController: 'colour',
numBasicColours: 5,
basicColours: function(){
return this.get('arrangedContent').slice(0, this.get('numBasicColours'))
}.property('arrangedContent'),
});
但我希望能够在没有itemController='colour'
每次调用的情况下做到这一点,特别是因为该选项不是动态查找的,即我做不到itemController=itemController