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.
爲什麼?我究竟做錯了什麼?我該如何解決它?