Tag Archives: angularjs

angularjs-ng-repeat-example-with-index

AngularJs ng-repeat example

angularjs tutorial

<!DOCTYPE html>
<html>
    <head>
        <script src="http://www.ptutorial.com/angularjs/angular.min.js"></script>
    </head>
    <body ng-app="">
            <h3>ng reapeat Complete  array example</h3>
            <div ng-repeat="n in [42, 42, 43, 43,45,62,85,82] track by $index">
                {{$index}} === {{n}}
            </div> <hr/>
        </div>

    </body>
</html>

Output

ng reapeat Complete array example
0 === 42
1 === 42
2 === 43
3 === 43
4 === 45
5 === 62
6 === 85
7 === 82