title: Grouping rows in ngrepeat
body: <p>I have json array and i want to create table from this and want to give a heading which is an element of array. Here is <a href="http://jsfiddle.net/uumrdL7z/2/" rel="nofollow">fiddle</a> showing the scenario. </p>
  
  <pre><code> &lt;div ng-repeat="products in items"&gt; 
      &lt;div&gt;{{products.IDTYPE}}&lt;/div&gt;
      &lt;div&gt;
          &lt;table border=1&gt;
              &lt;thead&gt;
                  &lt;th&gt;primkey&lt;/th&gt;
                  &lt;th&gt;userid&lt;/th&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  &lt;tr&gt;
                      &lt;td&gt;{{products.PRIMKEY}}&lt;/td&gt;
                      &lt;td&gt;{{products.USERID}}&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;    
      &lt;/div&gt;
  </code></pre>
  
  <p>This will create simple table with heading from the IDTYPE . But i want to group the rows with unique IDTYPE. So desired table will be as shown in this <a href="https://jsfiddle.net/m2m1xqhd/" rel="nofollow">link</a>.</p>
  
  <p>So i tried adding a ng-show condition <code>ng-show="$index==0 || items[$index-1].IDTYPE!=items[$index].IDTYPE"</code> but it doesn't work properly as tbody and table will be constructed for every row.<a href="http://jsfiddle.net/uumrdL7z/5/" rel="nofollow">This</a> is what i have tried.</p>
  
  <p>So how to generate the table as i desired in the above description?</p>