Is there a way to display only the first element in Angular without using ng-repeat?
I have been trying to achieve this using ng-repeat
as shown below:
<div ng-repeat="product in products" ng-show="$first">
<div>{{ product.price }}</div>
</div>
However, since I don't need to repeat anything, is there a simpler method to display just the first element without incorporating an ng-repeat loop?