title: Angular JS ng-if an ng-repeat complex match length is greater than given value?
body: <p>I have an ng-repeat that shows a table based on one loop, and then a cell based on a different loop:</p>
  
  <pre><code>&lt;tbody&gt;
     &lt;tr ng-repeat="r in roles | limitTo: 30"&gt;
       &lt;td&gt;{{r.name}}&lt;/td&gt;
       &lt;td&gt;
          &lt;span ng-repeat="t in users100 | limitTo: r.userLimit" ng-if="t.role == r.name"&gt;&lt;a href="{{t.id}}"&gt;{{t.full_name}}&lt;/a&gt;&lt;/span&gt; 
          &lt;span ng-if="true"&gt;&lt;a href="" ng-click="r.userLimit=500"&gt;Show all&lt;/a&gt;&lt;/span&gt;
       &lt;/td&gt;
     &lt;/tr&gt;
   &lt;/tbody&gt;
  </code></pre>
  
  <p>Each row is a Role, first cell shows the role's name. </p>
  
  <p>Second cell shows all results from a different dataset where the <code>role</code> in that set matches the original set's <code>role</code> value. (It repeats a <code>SPAN</code> for each match up to <code>r.userLimit</code>, set in the JSON at 20)</p>
  
  <p>The A tag has a click which sets the value of <code>r.userLimit</code> to 500, so it shows all the users.</p>
  
  <p>My question is, I only want to show this link IF the number of matches to the initial repeater is greater than the value of r.userLimit (20)</p>
  
  <p>So I thought </p>
  
  <pre><code>ng-if="((t.role == r.name).length &gt; r.userLimit)"
  </code></pre>
  
  <p>But my syntax is wrong, since the link never shows.  What's wrong wih my syntax?</p>