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 


The following two tabs change content below.
Umar Farooque Khan is Software developer and professional blogger serving Worldwide on freelancer and ODesk platform to show the capability of his skills. He is the founder of pTutorial.com. The main purpose of this site is sharing and exchanging of Knowledge related to the recent technologies.