Commit de4b70b9 authored by Christoph Burgdorf's avatar Christoph Burgdorf

fixed bug in clearCompletedItems

parent aae4616f
......@@ -23,7 +23,7 @@
<ul id="todo-list">
<li ng:repeat="todo in todos">
<div class="view">
<input class="toggle" type="checkbox">
<input class="toggle" type="checkbox" name="todo.done">
<label>{{ todo.content }}</label>
<a class="destroy" ng:click="removeTodo(todo)"></a>
</div>
......@@ -32,7 +32,7 @@
</ul>
</section>
<footer ng:show="hasTodos()">
<a id="clear-completed" ng:show="hasFinishedTodos()">{{ clearItemsText() }}</a>
<a id="clear-completed" ng:click="clearCompletedItems()" ng:show="hasFinishedTodos()">{{ clearItemsText() }}</a>
<div id="todo-count"><b>{{ remainingTodos() }}</b> {{ itemsLeftText() }}</div>
</footer>
</div>
......
......@@ -55,7 +55,7 @@ App.Controllers.TodoController = function () {
};
self.clearItemsText = function(){
var finishedTodos = finishedTodos();
var finishedTodos = self.finishedTodos();
return 'Clear ' + finishedTodos + ' completed ' + pluralize(finishedTodos, 'item');
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment