多个特殊字符时,AngularJs搜索功能不起作用 [英] AngularJs Search functionality is not working when more than one special characters
问题描述
我已经在应用程序中实现了Angular Js搜索功能.当我输入多个特殊字符(例如"!@ ")时,它将显示所有结果.我认为感叹号是问题所在.我该如何解决?在他们的演示站点中也无法正常工作. http://docs.angularjs.org/api/ng.filter:filter
I have implemented Angular Js search functionality in application. When I have enter more than one special characters for example '!@' it will display all the results.I think the exclamation character is the problem. How can I resolve this? In their demo site is also not working.http://docs.angularjs.org/api/ng.filter:filter
来源可以在他们的网站上找到.
source can find from their site.
推荐答案
看到您的工作有些错误,因为它允许您进行多个特殊字符的搜索,但是在您的情况下,您使用的是!@",则意味着包括所有带有"@"的结果.因此,如果您选择使用"@ *",它将显示将这些字符组合在一起的所有结果.
See you are working somewhat wrong, because it allows you to have the multiple special characters search, but in your case you are using "!@" it means not include all those result having "@" in it. So, if you choose to have "@*" it will show you to get all the result having these characters together.
这篇关于多个特殊字符时,AngularJs搜索功能不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!