Currently, I am utilizing AngularJS ng-repeat to loop through some data. However, I am trying to create a grid layout and want to apply a 'grid--last' class to the 4th item in the grid. Is there a way to achieve this?
This is what my HTML looks like:
<div ng-repeat="service in services" class="grid__4">
<div class="services__box">
<img src="img/services/{{service.thumb}}.jpg" alt="" class="services__box__img">
<h1 class="services__box--alpha alpha">{{service.title}}</h1>
<p>
{{service.text}}
</p>
<a href="{{service.url}}.php" class="services__box--btn btn btn--blue">{{service.button}}</a>
</div>
</div>
I am looking to determine the index of the array and utilize ng-class for this task. Any suggestions on how to get this done would be greatly appreciated. Thank you!
ng-class="{}"