139
rated 0 times
[
146]
[
7]
/ answers: 1 / hits: 31927
/ 11 Years ago, tue, december 3, 2013, 12:00:00
How do I show only the first element in angular?
I'm using ng-repeat
like this:
<div ng-repeat=product in products ng-show=$first>
<div>{{ product.price }}</div>
</div>
But since I'm not repeating, then I shouldn't have to use ng-repeat
? How can I get this to display just the first, without having to go in a ng-repeat?
More From » angularjs