title: In ng-repeat how to get the $last item in a filter?
body: <p>I define a collection of language objects like this:</p>
  
  <pre><code>$scope.languages = [
      {'name':'English', value:'english', 'checked':true, 'available': true},
      {'name':'German', value:'german', 'checked':false, 'available': true},
      {'name':'Spanish', value:'spanish', 'checked':true, 'available': true}
  ];
  </code></pre>
  
  <p>Then I display them in checkboxes like this:</p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label for="description"&gt;Languages&lt;/label&gt;
      &lt;div class="checkbox" data-ng-repeat="language in languages"&gt;
          &lt;label&gt;&lt;input type="checkbox" ng-model="language.checked"&gt;{{language.name}}&lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And as they are checked on and off, I display a list of them like this:</p>
  
  <pre><code>&lt;div class="dataRow"&gt;
      &lt;div class="dataLabel"&gt;Languages:&lt;/div&gt;
      &lt;div class="dataValue text-success" data-ng-repeat="language in languages"&gt;
          &lt;span ng-if="language.checked"&gt;{{language.name + ($last ? '' : ',')}}&lt;/span&gt;
      &lt;/div&gt;
      &lt;div class="clear"&gt;&lt;/div&gt;
  &lt;/div&gt;  
  </code></pre>
  
  <p>And as long as the last language is selected, then the final comma will not be shown. But if the last language (Spanish) is not selected, then the final comma is erroneously shown.</p>
  
  <p>Instead of <code>$last</code> I need something like <code>$last(isChecked)</code>. How do I do that?</p>