<!DOCTYPE html>
<html ng-app="ToDo">
    <head>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
        <script src="todo.js"></script>
    </head>
    <body>
        <div ng-controller="TodoController as todoCtrl">
            <form ng-submit="todoCtrl.addTodo()">
                <input ng-model="todoCtrl.todoText">
                </input>
                <input type="submit" value="Add Item">
                </input>
            </form>
            <ul>
                <li ng-repeat="todo in todoCtrl.todos | filter:todoCtrl.search">
                    <input type="checkbox" ng-model="todo.done">
                    </input>
                    {{todo.text}}
                </li>
            </ul>
        
    </body>
</html>

<!DOCTYPE html>
<html ng-app="ToDo">
    <head>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
        <script src="todo.js"></script>
    </head>
    <body>
        <div ng-controller="TodoController as todoCtrl">
            <a href ng-click="todoCtrl.search.done = false">
                To Do
            </a>
            <a href ng-click="todoCtrl.search.done = true">
                Archive
            </a>
            
            <form ng-submit="todoCtrl.addTodo()" ng-hide="todoCtrl.search.done">
                <input ng-model="todoCtrl.todoText">
                </input>
                <input type="submit" value="Add Item">
                </input>
            </form>
            <ul>
                <li ng-repeat="todo in todoCtrl.todos | filter:todoCtrl.search">
                    <input type="checkbox" ng-model="todo.done">
                    </input>
                    <input ng-model="todo.text" style="border:0" ng-hide="todo.done">
                    </input>
                    <span ng-show="todo.done">
                        {{todo.text}}
                    </span>
                </li>
            </ul>
        
    </body>
</html>

Add functionality to edit active todos and disallow edit done todos
Add functionality to edit active todos and disallow edit done todos
