title: Get the length of items in ng-repeat outside the loop in Angular JS
body: <p>I have the following HTML where i am listing few items with Angular JS <strong>ng-repeat</strong></p>
  <pre><code>&lt;div class=&quot;header-container&quot;&gt;
      &lt;div class=&quot;header-list&quot; data-ng-repeat=&quot;details in response.data&quot; data-ng-show='$index&lt;3'&gt;{{ details.name }}&lt;/div&gt;
      &lt;div class=&quot;show-more&quot; data-ng-if=&quot;details.length &gt; 3&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/rGj86.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rGj86.png" alt="enter image description here" /></a></p>
  <p><code>header-list</code> and <code>show-more</code> are sibling <strong>div</strong>s and i have ng-repeat on <code>header-list</code>. i only want to show the div <code>show-more</code> if the number of items in <code>header-list</code> is more than 3. since the scope of the ng-repeat is not in <code>show-more</code> i cannot do this. is there a way to do this without changing the DOM structure? Thanks in advance</p>