I have array of objects in Angular JS.
For showing this array I use ng-repeat
with filter by value from input field.
Problem is that when I typing text in field ng-repeat
makes filtering and changes indexes of array.
Default array before filtering:
0 => obj(o)
1 => obj(b)
2 => obj(c)
If I type "b" I get output list:
0 => obj(b)
But with index 0
, if element is one.
So index 0
had obj(o)
before filtering.
How I can save indexes that will be 1 => obj(b)
after filtering?