Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJs number count in table

Tags:

angularjs

<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 code is work properly but how can i count the number and display in No??

Result enter image description here

like image 521
Ch Hong Avatar asked Nov 24 '25 21:11

Ch Hong


1 Answers

try this

  <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>
like image 134
venkat Avatar answered Nov 26 '25 12:11

venkat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!