-3

How the Way Start descending order Number Via {{1+ $index}}

Example 1,2,3,4, to 4,3,2,1

                    <thead>
                        <tr>
                            <th width="5%">#</th>

                            <th width="20%">link</th>


                        </tr>
                    </thead>
                    <tbody>
                        <tr data-ng-repeat="user in post.users  | orderBy : '-id'">
                            <th>{{1+$index}}</th>

                            <td> 
                            <a href="{{user.email}}" target="_blank">{{user.email}}</a>
                             </td>


                        </tr>
                    </tbody>
R. Richards
  • 24,603
  • 10
  • 64
  • 64

1 Answers1

0

to do this you can use java script reverse() function.store that reversed array in a array variable and iterate in your html file if you are using angular 2 or above.

ankit chauhan
  • 37
  • 1
  • 9