Personally, I have the following problem, I have a list of names:
$scope.names=["Max", "Tom", "Ralf", "Jerry", "Snow", "Carl"];
I made a normal filter for the input search
<ul>
<li ng-repeat="name in names | filter: search">{{name}}</li>
</ul>
</div>
<div>
<input type="search" ng-model="search">
</div>
However, I want to create a custom filter to display only the names related to 1st letter entered in the input search, in this case, type the letter "R" and the result is just "Ralf" instead of searching the "R" in all the lyrics, which results in "Ralph" and "Jerry".
I thought of using an angular.forEach to scroll through the names but did not get the result I wanted, if it helps, follow the codepen to make it easier: