gpt4 book ai didi

angularjs - 仅当索引大于 1 时才在重复列表中显示按钮

转载 作者:行者123 更新时间:2023-12-04 18:09:49 26 4
gpt4 key购买 nike

我有一个 ng-repeated 列表,如何仅在 $index 大于 1 时才在列表中显示按钮?

plunkr 开始:Plunkr

最佳答案

ng-if仅在 angular 1.1.5 及更高版本中可用。要么升级 Angular 版本,要么使用 ng-show反而:

<p data-ng-show="$index > 1">
<a href="#">This button will only show when index is more than 1</a>
</p>

关于angularjs - 仅当索引大于 1 时才在重复列表中显示按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16938850/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com