2
Ember.VERSION : 1.0.0-rc.1
Handlebars.VERSION : 1.0.0-rc.3
jQuery.VERSION : 1.8.2
这里是我的模型的一部分:为什么@each使模板重新渲染?
first_three: function() {
var staples = this.get('staples');
var data = staples.slice(0,3));
return data;
}.property('[email protected]')
我使用的模板:
{{#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.
为什么?我究竟做错了什么?我该如何解决它?