Let suppose I have an array of strings like ["don't worry", "worry", "Always be happy and don't worry" ]
When I search for worry,using default search filter on ng-repeat, it gives me all three results irrespective of the position at which worry is in the string to be searched.
I am trying to make a custom search filter for ng-repeat such that on searching worry I should get results sorted according to the position of "worry" in the original string.
So upon searching for word "worry" in the above array, my expected output will be ["worry", "don't worry", "Always be happy and don't worry"].
Is this possible?