<section id="todoapp" class="todoapp">
    <header id="header">
        <h1>todos</h1>
        <form id="todo-form" class="todo-form" ng-submit="addTodo()">
            <input id="new-todo" class="new-todo" placeholder="What needs to be done?" ng-model="newTodo" ng-disabled="saving" autofocus>
        </form>
    </header>
    <section id="main" class="main" ng-show="todos.length" ng-cloak>
        <input id="toggle-all" class="toggle-all" type="checkbox" ng-model="allChecked" ng-click="markAll(allChecked)">
        <label for="toggle-all">Mark all as complete</label>
        <ul id="todo-list" class="todo-list">
            <li ng-repeat="todo in todos | filter:statusFilter track by $index" ng-class="{completed: todo.completed, editing: todo == editedTodo}">
                <div class="view">
                    <input class="toggle" type="checkbox" ng-model="todo.completed" ng-change="toggleCompleted(todo)">
                    <label ng-dblclick="editTodo(todo)">{{todo.title}}</label>
                    <button class="destroy" ng-click="removeTodo(todo)"></button>
                </div>
                <form ng-submit="saveEdits(todo, 'submit')">
                    <input class="edit" ng-trim="false" ng-model="todo.title" todo-escape="revertEdits(todo)" ng-blur="saveEdits(todo, 'blur')"
                        todo-focus="todo == editedTodo">
                </form>
            </li>
        </ul>
    </section>
    <footer id="footer" class="footer" ng-show="todos.length" ng-cloak>
        <span id="todo-count" class="todo-count"><strong>{{remainingCount}}</strong>
            <ng-pluralize count="remainingCount" when="{ one: 'item left', other: 'items left' }"></ng-pluralize>
        </span>
        <ul id="filters" class="filters">
            <li>
                <a ng-class="{selected: status == ''} " href="#/">All</a>
            </li>
            <li>
                <a ng-class="{selected: status == 'active'}" href="#/active">Active</a>
            </li>
            <li>
                <a ng-class="{selected: status == 'completed'}" href="#/completed">Completed</a>
            </li>
        </ul>
        <button id="clear-completed" class="clear-completed" ng-click="clearCompletedTodos()" ng-show="completedCount">Clear completed</button>
    </footer>
</section>
<footer id="info" class="info">
    <p>Double-click to edit a todo</p>
    <p>Credits:
        <a href="https://twitter.com/cburgdorf">Christoph Burgdorf</a>,
        <a href="http://ericbidelman.com">Eric Bidelman</a>,
        <a href="http://jacobmumm.com">Jacob Mumm</a> and
        <a href="http://blog.igorminar.com">Igor Minar</a>
    </p>
    <p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
