nam vo nam vo - 6 months ago 74
AngularJS Question

Skip first item in ng-repeat

I want to skip the first item in ng-repeat

..first item here

<ul class="highlight-topright">
<li ng-repeat="item in hpHeadlines | filter:$index>0">
...
</li>
</ul>


it doesn't work, anything wrong here ?

I understand that i can use ng-if, ng-show to hide things but I just cannot get why the filter doesn't work in 1.3.x in this case.

Thanks.

Answer
<ul class="highlight-topright">
        <li ng-repeat="item in hpHeadlines" ng-if="$index > 0">
          ...
        </li>
</ul>
Comments