0
继续阅读SproutCore "Getting started"教程并遇到问题。SproutCore待办事项列表错误
的Todos.todoListController里面有一个功能:
Todos.todoListController = SC.ArrayController.create({
// ...
remaining: function() {
return this.filterProperty('isDone', false).get('Length');
}.property('@each.isDone')
});
出于某种原因,这将不显示其余项目的实际数量。它显示为“未定义”:
我写的代码自己的第一个绕过去,但是从本教程复制的代码,并尝试了故障 - 仍然得到同样的错误。