title: AngularJS add conditional class in ng-repeat
body: <p>I'm working with some AngularJS ng-repeat looping, but I want to generate the markup of a grid, but need to add a 'grid--last' class to the 4th item in the grid, is this achievable?</p>
  
  <p>My HTML:</p>
  
  <pre><code>&lt;div ng-repeat="service in services" class="grid__4"&gt;
                  &lt;div class="services__box"&gt;
                      &lt;img src="img/services/{{service.thumb}}.jpg" alt="" class="services__box__img"&gt;
                      &lt;h1 class="services__box--alpha alpha"&gt;{{service.title}}&lt;/h1&gt;
                      &lt;p&gt;
                          {{service.text}}
                      &lt;/p&gt;
                      &lt;a href="{{service.url}}.php" class="services__box--btn btn btn--blue"&gt;{{service.button}}&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>Ideally I need to get the index of the array and use ng-class. Can anybody shed some light as to how I could do this? Thanks!</p>
  
  <pre><code>ng-class="{}"
  </code></pre>