跳过 ng-repeat 中的第一项 [英] Skip first item in ng-repeat

查看:28
本文介绍了跳过 ng-repeat 中的第一项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想跳过 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 ?

我知道我可以使用 ng-if、ng-show 来隐藏东西,但我不明白为什么在这种情况下过滤器在 1.3.x 中不起作用.

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.

谢谢.

推荐答案

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

这篇关于跳过 ng-repeat 中的第一项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆