K
K
korvute2014-06-18 23:41:44
Angular
korvute, 2014-06-18 23:41:44

How to make filter:search in AngularJs ignore letters with diacritics?

How can I make AngularJS not distinguish between é, á, ó and e, ao , i.e. ignore diacritics?
For example, there is such an array: jsfiddle.net/gFGFN/11/, where, if you write Jamon, nothing is found, and if it is already Jamón, then the result is displayed.
On StackOverflow, someone was offered a solution like this: jsfiddle.net/gFGFN/1/, but with an array of the form

$scope.names = [{name: 'Jamón', surname: 'Géroux'},
 {name: 'Andrés', surname: 'Guérin'},
 {name: 'Cristián', surname: 'Róse'},
 {name: 'Fernán', surname:'Raúlien'}];

it doesn't work anything. All examples on Github and Built with Angular.Js suffer from the same problem.
What would be the simplest and optimal solution for such a problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2014-06-19
@k12th

Keep two versions of names - with and without diacritics. Use the first for display, the second for search.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question