Serial No in angularJs while using ng-repeat

In this code snippet i am assuming that you are done with angular code. You are done with fetching the records from api and you are just bind data on view.

<div class="table-responsive" ng-app="myModule" ng-controller="myController">
    <table class="table">
        <thead>
            <tr>
                <th>SN</th>
                <th>Name</th>
                <th>Email</th>
                <th>Phone</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="data in dataList">
                <td>{{$index+1}}</td>
                <td ng-bind="data.Name"></td>
                <td ng-bind="data.Email"></td>
                <td ng-bind="data.Phone"></td>
            </tr>
        </tbody>
    </table>
</div>

Output

serial-no-output

Tags: , , , ,