In this example we bind the numbers array with some duplicate values (2 is two times in the array) with the div tag using ng-repeat directive. As there are duplicate values so we have to track this array by $index. Using the ng-repeat directive we print the index of the array element and value on the index, Use 'track by' expression to specify unique keys. See the output.

<html xmlns=""> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src=""></script> </head> <body ng-app> <div> <div ng-repeat="n in [2,2, 4, 6, 8,10,12] track by $index"> Index - {{$index}} ______________ Value - {{n}} </div> </div> </body> </html>