首页 > 解决方案 > 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.

标签: angular

解决方案


The most easy way to do this is with the method toUpperCase() or toLowerCase()

example :

if(string1.toLowerCase() === string2.toLowerCase()){
   //do something
}

推荐阅读