title: AngularJS ng-repeat two elements one row
body: <p>my question is regarding ng-repeat's capabilities. I have a list of objects that i'm using it to iterate over but I want to be able to display two of them in the same row but so far I'm sort of clueless.
  Is there a way I can use ng-repeat in a similar way to array indexing in other languages? </p>
  
  <pre><code>&lt;div ng-app="sps" ng-controller="peoplecontrol"&gt;
      &lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;h1&gt;Members&lt;/h1&gt;
          &lt;/div&gt;
          &lt;center&gt;&lt;h3&gt;Administration&lt;/h3&gt;&lt;/center&gt;
  
          &lt;div ng-repeat ='admin in admins'&gt;
              &lt;div ng-if= "$index%2== 0"&gt; 
                  &lt;div class="col-sm-1"&gt;&lt;/div&gt;
                      &lt;div class="col-sm-5"&gt;
                          &lt;img class= 'img-responsive' src='{{admin.img}}' /&gt;
                      &lt;/div&gt;
  
                      &lt;div class="col-sm-6"&gt;
                          &lt;h4&gt;{{admin.position}}&lt;/h4&gt;
                          &lt;p&gt;&lt;i&gt;{{admin.description}}&lt;/i&gt;&lt;/p&gt;
                          &lt;p&gt;{{admin.bio}}&lt;/p&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;&lt;!-- end of evens--&gt;
  
                  &lt;div ng-if = "$index%2!=0"&gt;
                      &lt;div class="col-sm-1 col-sm-1"&gt;&lt;/div&gt;
                          &lt;div class="col-sm-5"&gt;
                              &lt;img class="img-responsive" src='{{admin.img}}'/&gt;
                          &lt;/div&gt;
  
                          &lt;div class="col-sm-6"&gt;
                              &lt;h4&gt;{{admin.position}}&lt;/h4&gt;
                              &lt;p&gt;&lt;i&gt;{{admin.description}}&lt;/i&gt;&lt;/p&gt;
                              &lt;p&gt;{{admin.bio}}&lt;/p&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;&lt;!-- end of odds--&gt; 
                  &lt;/div&gt;&lt;!--end of rows--&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>