Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 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>