Skip to content

Commit de4b70b

Browse files
committed
fixed bug in clearCompletedItems
1 parent aae4616 commit de4b70b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

architecture-examples/angularjs/index_new.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>Todos</h1>
2323
<ul id="todo-list">
2424
<li ng:repeat="todo in todos">
2525
<div class="view">
26-
<input class="toggle" type="checkbox">
26+
<input class="toggle" type="checkbox" name="todo.done">
2727
<label>{{ todo.content }}</label>
2828
<a class="destroy" ng:click="removeTodo(todo)"></a>
2929
</div>
@@ -32,7 +32,7 @@ <h1>Todos</h1>
3232
</ul>
3333
</section>
3434
<footer ng:show="hasTodos()">
35-
<a id="clear-completed" ng:show="hasFinishedTodos()">{{ clearItemsText() }}</a>
35+
<a id="clear-completed" ng:click="clearCompletedItems()" ng:show="hasFinishedTodos()">{{ clearItemsText() }}</a>
3636
<div id="todo-count"><b>{{ remainingTodos() }}</b> {{ itemsLeftText() }}</div>
3737
</footer>
3838
</div>

architecture-examples/angularjs/js/controllers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ App.Controllers.TodoController = function () {
5555
};
5656

5757
self.clearItemsText = function(){
58-
var finishedTodos = finishedTodos();
58+
var finishedTodos = self.finishedTodos();
5959
return 'Clear ' + finishedTodos + ' completed ' + pluralize(finishedTodos, 'item');
6060
}
6161

0 commit comments

Comments
 (0)