DWQA QuestionsCategory: ProgramHow to write and filter angular fuzzy queries
liy0710 asked 2 months ago

If you want to make a fuzzy query on the field content, please ask the great God for advice on how to write and filter an angular fuzzy query

leftstick replied 2 months ago

The problem is too rough. For example, do you want to fuzzy match all the fields of the entered data? Or specify a field?Also, what kind of fuzzy method is fuzzy? Give examples to increase the probability of others helping you.

leftstick replied 2 months ago

Want to perform fuzzy matching on the obtained background dataFor example: how to filter the CAC contained in the eventcode field

leftstick replied 2 months ago

If I find such a method in the rookie tutorial, I still don’t understand how to use it. Ask for advice (I don’t understand how to apply it to the examples I need)<p>Input filter:</p>
<p><input type=”text” ng-model=”test”></p>
<ul> <li ng-repeat=”x in names | filter:test | orderBy:’country'”>
{{ (x.name | uppercase) + ', ' + x.country }}
</li>

2 Answers
oceania answered 2 months ago

Filter plus regular expression

caizhongkun answered 2 months ago

List | filter: {field name: fuzzy string}
List Filter: fuzzy matching function
reference resources:http://showcase.ngnice.com/#/&#8230;