Skip to content

Commit

Permalink
changed model property "content" to "title"
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgdorf committed Mar 1, 2012
1 parent 68f57e1 commit 62fa615
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions architecture-examples/angularjs/index.html
Expand Up @@ -22,11 +22,11 @@ <h1>Todos</h1>
<li ng:repeat="todo in todos" my:dblclick="editTodo(todo)" ng:class="(todo.done && ' done ') + (todo.editing && ' editing ')">
<div class="view">
<input class="toggle" type="checkbox" name="todo.done">
<label>{{ todo.content }}</label>
<label>{{ todo.title }}</label>
<a class="destroy" ng:click="removeTodo(todo)"></a>
</div>
<form ng:submit="finishEditing(todo)">
<input class="edit" type="text" name="todo.content" my:focus="todo.editing" my:blur="finishEditing(todo)">
<input class="edit" type="text" name="todo.title" my:focus="todo.editing" my:blur="finishEditing(todo)">
</form>
</li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions architecture-examples/angularjs/js/controllers.js
Expand Up @@ -9,7 +9,7 @@ App.Controllers.TodoController = function () {
if (self.newTodo.trim().length === 0) return;

self.todos.push({
content: self.newTodo,
title: self.newTodo,
done: false,
editing: false
});
Expand All @@ -25,7 +25,7 @@ App.Controllers.TodoController = function () {
};

self.finishEditing = function(todo) {
if (todo.content.trim().length === 0){
if (todo.title.trim().length === 0){
self.removeTodo(todo);
}
else{
Expand Down

0 comments on commit 62fa615

Please sign in to comment.