filter error

25 views
Skip to first unread message

Mr. Adam

unread,
Nov 15, 2015, 6:19:32 AM11/15/15
to AngularJS
hello every one 

i have a list and input to filter it : 

<input ng-model="searchCode" class="form-control" placeholder="Search By Code" type="number"/> 

<tr ng-repeat="item in items | filter : {Code:searchCode}"></tr> 

the filter work fine when I write any number for the searchCode but when I remove the filtered code the list is not appear... 

I think because the filtered become null or empty can anyone tells me how to make the filter not accept null or empty from the input to fix this error 

regards /Adam

Vaibhav Gupta

unread,
Nov 16, 2015, 1:10:52 AM11/16/15
to AngularJS
Hi,

Can you help me out in understanding the problem? I created a plunker to test your case:


It seems to work fine. When I clear the input, filter doesn't apply.

Thanks,

Vaibhav Gupta

Mr. Adam

unread,
Dec 3, 2015, 2:26:36 PM12/3/15
to ang...@googlegroups.com
it's working fine with me what is the issue u have ... I write the code1 and it filter the results with name 1 ... what is the problem man :)

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/ShN4k_TO3rg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages