Here is my angular View
<li class= "riskmanagementlink" ng-repeat="link in links">
<h3> {{link.Description}} </h3>
<a> {{link.Title}} </a>
<hr/>
</li>
I would like to remove the hr tag for the last list item. Can anybody help me do this please?
The ng-repeat
directive comes with some extra properties like $last
, which indicates that you're on the last item of your collection.
<li class="riskmanagementlink" ng-repeat="link in links">
<h3> {{ link.Description }} </h3>
<a> {{ link.Title }} </a>
<hr ng-if="!$last" />
</li>
More info in the docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With