tinymce Uncaught TypeError:无法设置属性' onload'为null

时间:2017-06-10 03:51:07

标签: ajax backbone.js underscore.js

当加载具有多个集合的视图和主视图的多个子视图时,如何等待所有内容加载并使用所有数据呈现视图。有人可以给我一些关于如何做的示例代码

主链:

initialize: function() {
    this.data = this.model.toJSON();
    this.collections = [];
    this.collections[0] = new category.CategoriesCollection({ });               
    this.collections[0].fetch();

    this.childViews = [];
    this.childViews[0] = new ImageViewCollection({ collection: new ImageCollection() });                

    //this.model.on('add', this.render(), this);                

    for(var i = 0;  i < this.collections.length; i++) {
        this.listenTo(this.collections[i], 'add', this.render());
    }
},

0 个答案:

没有答案