Ember.js CollectionView order

前端 未结 2 738
心在旅途
心在旅途 2021-01-03 06:03

I have an ArrayController which is periodically updated. It has a sorted computed property which keeps things in order. I\'m trying to use a

2条回答
  •  长情又很酷
    2021-01-03 06:53

    For the sake of completeness to @sly7_7's correct answer, here is a version with CollectionView, see http://jsfiddle.net/pangratz666/ctPAA/.

    Handlebars:

    
    

    JavaScript:

    App.itemController = Em.ArrayController.create({
    
        sortProperties: 'id'.w(),
    
        // random order
        content: Em.A([
            ...
        ])
    
    });
    

提交回复
热议问题