title: Remove "checked" item from array with angularJS
body: <p>I've got a list with todo's, in that list I can check them if they are done.
  If they are done I want to remove them from my list with angularJS.</p>
  
  <pre><code>&lt;body&gt;
      &lt;h2&gt;Todo&lt;/h2&gt;
      &lt;div ng-controller="TodoListController as todoList"&gt;
          &lt;span&gt;{{todoList.remaining()}} van de {{todoList.todos.length}} nog te doen&lt;/span&gt;
          &lt;ul class="unstyled"&gt;
              &lt;li ng-repeat="todo in todoList.todos"&gt;
                  &lt;label class="checkbox"&gt;
                      &lt;input type="checkbox" ng-model="todo.done"&gt;
                      &lt;span class="done-{{todo.done}}"&gt;{{todo.text}}&lt;/span&gt;
                  &lt;/label&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
          &lt;form name="formaddtodo" ng-submit="todoList.addTodo()"&gt;
              &lt;input type="text" ng-model="todoList.todoText" ng-minlength="1"  size="30"
                     placeholder="Voeg nieuwe todo toe" required&gt;
              &lt;input class="btn-primary" type="submit" value="voeg toe"&gt;
          &lt;/form&gt;
          &lt;input class="btn-danger" type="button" value="verwijder" ng-click="todoList.removeItem()"&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>with the removeItem function I want to delete the checked items from the list.</p>
  
  <pre><code>angular.module('todoApp', [])
  .controller('TodoListController', function() {
      var todoList = this;
      todoList.todos = [{text:'learn AngularJS', done:false},
          {text:'build an AngularJS app', done:false}];
  
      todoList.addTodo = function () {
          todoList.todos.push({text: todoList.todoText, done: false});
          todoList.todoText = '';
      };
  
      todoList.remaining = function () {
          var count = 0;
          angular.forEach(todoList.todos, function (todo) {
              count += todo.done ? 0 : 1;
          });
          return count;
      };
  
      todoList.removeItem = function() {
          todoList.todos.splice(???)
      }
  });
  </code></pre>
  
  <p>It would be awesome if someone can explain it to me!</p>