Ember.VERSION : 1.0.0-rc.1
Handlebars.VERSION : 1.0.0-rc.3
jQuery.VERSION : 1.8.2
这是我模型的一部分:
first_three: function() {
var staples = this.get('staples');
var data = staples.slice(0,3));
return data;
}.property('staples.@each.isLoaded')
我在模板中使用它:
{{#each staple in album.first_three}}
{{#linkTo staples.details staple}}
<img {{bindAttr src="staple.object.image_pict"}}>
{{/linkTo}}
{{/each}}
结果,我得到了
NS_ERROR_DOM_NOT_OBJECT_ERR: Parameter is not an object
和
Error: Something you did caused a view to re-render after it rendered but before it was inserted into the DOM.
为什么?我究竟做错了什么?我该如何解决?