angular - Is there any way to get nzshowsearch to be case insensitive?
问题描述
My data is loaded from the backend using a json file and stored in a form. I'd like to know if there's any way to make the search box find results irrespective of the case being used.
解决方案
The most easy way to do this is with the method toUpperCase() or toLowerCase()
example :
if(string1.toLowerCase() === string2.toLowerCase()){
//do something
}
推荐阅读
- mysql - sqlite中的表别名但不是mysql
- java - com.android.builder.dexing.DexArchiveBuilderException: 无法处理 D:....\app\build\intermediates\transforms\desugar\debug\13.jar
- xml - 在 XSLT 1.0 中将复制的节点转换为字符串
- api - Sparkpost 使用 bash、CURL 和 SMTP 协议发送电子邮件
- c++ - 在处理单独的 .cpp 和 .h 文件中的类时,实现继承的正确方法是什么?
- selenium - 即使元素在页面文档中,Selenium Webdriver 也会返回 StaleElementReferenceException
- system-verilog - 您如何指定应该详细说明哪些 SystemVerilog 绑定?
- python - 如何在pygame中获取输入和更新文本?
- azure - Azure Service Fabric 群集的负载均衡器
- java - 生成令牌以访问邮递员的文档时出错