examples/todomvc/js/components/todoListComponent.js
function (todo) {
      model.remove(todo.id, function () {
        todos.splice(todos.indexOf(todo), 1);
        if (todo.completed) {
          completedCount--;
        } else {
          itemsLeft--;
          checkedAll = completedCount === todos.length;
        }
      });
    }
function (todo) {
      model.remove(todo.id, function () {
        todos.splice(todos.indexOf(todo), 1);
        if (todo.completed) {
          completedCount--;
        } else {
          itemsLeft--;
          checkedAll = completedCount === todos.length;
        }
      });
    }
function ( todo ) { model . remove ( todo . id , function ( ) { todos . splice ( todos . indexOf ( todo ) , 1 ) ; if ( todo . completed ) { completedCount -- ; } else { itemsLeft -- ; checkedAll = completedCount === todos . length ; } } ) ; }
the todoComponent currently being edited
the todoComponent currently being edited