Reputation: 8289
I have an ng-repeated list how do I show a button within the list only if $index is more than 1 ?
plunkr to get started: Plunkr
Upvotes: 5
Views: 4405
Reputation: 18552
ng-if is only in available in angular 1.1.5 and later. Either upgrade the Angular version, or use ng-show instead:
<p data-ng-show="$index > 1">
<a href="#">This button will only show when index is more than 1</a>
</p>
Upvotes: 7