I have an angular filter by input text.
for the given list
initialViewModel.users = [
{user: 'Nithin',phone: 'Azus', price: 13000},
{user: 'Saritha',phone: 'MotoG1',price: 12000},
{user: 'Renjith',phone: 'MotoG2',price: 14000},
{user: 'Felix',phone: 'Nexus',price: 21000}];
It is returning incorrect results for the filter texts a,g,m,n,o,s,u,z
.
Sample fiddle here.
<ul>
<li ng-repeat="user in Model.users | filter: Model.name | orderBy:'price'">{{user.user + ' bought phone worth ' + user.price}}</li>
</ul>
Say for example, if I filter it with 'a' it should return only the one record having name saritha. Instead it returns two records.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…