One_Two,
<!doctype html>
<html ng-app>
<head>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js"></script>
<script>function TodoCtrl($scope) {
$scope.todos = [
{text:'learn angular', done:true},
{text:'build an angular app', done:false}];
$scope.addTodo = function() {
$scope.todos.push({text:$scope.todoText, done:false});
$scope.todoText = '';
};
$scope.archive = function(indx) {
$scope.todos.splice(indx,1);
};
}
</script>
<style type="text/css">
[data-role] {
font-weight: bold;
cursor: pointer;
}
</style>
</head>
<body>
<h2>Список дел</h2>
<div ng-controller="TodoCtrl">
<span>Всего {{todos.length}}</span>
<ul class="unstyled">
<li ng-repeat="todo in todos">
<span class="done-{{todo.done}}">{{todo.text}}</span>
<span data-role="remove" ng-click="archive($index)">удалить</span>
</li>
</ul>
<form ng-submit="addTodo()">
<input type="text" ng-model="todoText" size="30"
placeholder="впишите новое дело">
<input class="btn-primary" type="submit" value="добавить">
</form>
</div>
</body>
</html>