I'm trying to get the absolute $index of the ng-repeat when using the filter. For example I have an array like this:
$scope.notes = [
{
name: 'note 1',
value: '1'
},
{
name: 'note 2',
value: '2'
},
{
name: 'note 3',
value: '3'
},
{
name: 'note 4',
value: '4'
}
];
Without applying the filter, the $index refers to the index of each element in the array and I use the $index to the array.
note in notes | filter:filterTerm track by $index
When I use the expression above the $index gets updated for the new sub-array. Is it possible to get the absolute $index?