gpt4 book ai didi

表格中的 AngularJs 数字计数

转载 作者:行者123 更新时间:2023-12-05 03:11:56 24 4
gpt4 key购买 nike

<table align="center">
<tr>
<th>No</th>
<th>Movie Title</th>
</tr>
<tr data-ng-repeat="mov in movie | pagination: curPage * pageSize | limitTo: pageSize | filter:searchText" data-ng-show="showSuccessMessage" data-ng-click="selectMovie($event,mov)" data-ng-class="{'selected':selectedMovie.film_id===mov.film_id}" style="cursor: pointer;">
<td>

</td>
<td>
{{mov.title}}
</td>
</tr>
</table>

Aboe 代码可以正常工作,但我如何计算数量并显示为No??

结果 enter image description here

最佳答案

试试这个

  <table align="center">
<tr>
<th>No</th>
<th>Movie Title</th>
</tr>
<tr data-ng-repeat="mov in movie | pagination: curPage * pageSize | limitTo: pageSize | filter:searchText" data-ng-show="showSuccessMessage" data-ng-click="selectMovie($event,mov)" data-ng-class="{'selected':selectedMovie.film_id===mov.film_id}" style="cursor: pointer;">
<td>
{{ $index + 1 }}
</td>
<td>
{{mov.title}}
</td>
</tr>
</table>

关于表格中的 AngularJs 数字计数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35721182/

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