title: Using AngularJS to get the count of a sub array
body: <p>Basically I'm making a todo list with angular and I want to display the how many items have been marked as done I have an array object of Lists and each list has a collection of list items called todos like so:</p>
  
  <pre><code>[{listName: "ESSENTIALS", newTodoName:"", newTodoQ:"0", todos: [
                          { taskName : "Comb" , quantity: 1,  isDone : false , id: "comb" }                                               ]},
  {listName: "TOILETRIES", newTodoName:"", newTodoQ:"0", todos: [
                          { taskName : "Tooth Brush" , quantity: 1,  isDone : false , id: "toothbrush"},
                          { taskName : "Tooth paste" , quantity: 6,  isDone : false, id: "toothpaste" },
                          { taskName : "Deodorant" , quantity: 3, isDone : false, id: "deodorant" }
                                                                                      ]}];
  </code></pre>
  
  <p>So I have two ng-repeats.. One repeats the Lists then another inside of it prints out each list item. I have an H1 and next to the title I want to have the the items that were marked isDone as true next to the total amount of records to show how many items you have left.  As you can see I started to code up a filter but I believe it's wrong I keep getting: "Syntax Error: Token 'undefined' is unexpected, expecting [}] at column null of the expression [ (list.todos |] starting at [{4}]." which I'm not really sure what that means...my fourth item is blank? Yet I have all my todos there and they are not blank. Is my filter wrong? or a better way to do this?</p>
  
  <pre><code>  &lt;div class='row' ng-repeat="list in lists"&gt;
          &lt;h1 class='centerTitle'&gt;{{list.listName}} &lt;span class="listCounter"&gt; {{ (list.todos | filter:{todos: {isDone: true}}: true).length }} / {{list.todos.length}}&lt;/span&gt;&lt;/h1&gt;
  
        &lt;ul ui-sortable="todoSortable" ng-model="list.todos"&gt;
                                          &lt;li  ng-class="{taskDone: todo.isDone}" class="todoTask" ng-repeat="todo in list.todos | orderBy: 'isDone' "&gt;&lt;/li&gt;
    &lt;div&gt;
  </code></pre>