Here Mudassar Ahmed Khan has explained with an example, how to use the $index variable of ng-repeat directive in AngularJS.
The $index variable is used to get the Index of an item repeated using ng-repeat directive in AngularJS.
This article will explain how to use the $index of the row of HTML Table populated using ng-repeat directive in following two scenarios.
1. Get the Index inside the HTML Table cell using AngularJS.
2. Get the Index when Button within the HTML Table row is clicked using AngularJS.
↧