Ember-data RecordArray是已加载状态

ken*_*ken 6 ember.js ember-data

任何人都可以向我解释为什么isLoaded在调用ajax调用的成功方法之前RecordArray状态设置为true.

来自ember-data源代码

  findAll: function(store, type, since) {
    var root = this.rootForType(type);

    this.ajax(this.buildURL(root), "GET", {
      data: this.sinceQuery(since),
      success: function(json) {
          debugger;
        Ember.run(this, function(){
          this.didFindAll(store, type, json);
        });
      }
    });
  },
Run Code Online (Sandbox Code Playgroud)

在视图中定义

handler: function() {        
    var content, controller = this.get('controller');
    if(controller.get('content.isLoaded')) {
    }
}.observes('controller.content.isLoaded')
Run Code Online (Sandbox Code Playgroud)

ahm*_*eod 4

似乎存在一个持续存在的错误,即isLoaded在集合上过早设置属性。这是GitHub 上的相关问题