0

I am trying to add the Fuzzy filter following these installation steps

  1. Angular-filter - GetStarted
  2. Angular-filter fuzzy.

When I run the app, I get the error

Error: [$injector:unpr] Unknown provider: fuzzyFilterProvider <- fuzzyFilter

  • Any help about what I have missed or did wrong please?

or

  • Anyone know how do that in a javascript file instead of in the html file?

Here is my code:

my-component.html

<custom-text name="search" model="list.search"></custom-text>
<li ng-repeat="question in list.questions | fuzzy: list.search">

index.html

<!doctype html>
<html>
<head>

</head>
<body>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular-filter/0.5.17/angular-filter.min.js"></script>
    <script>
        var portal = angular.module('app-portal', ['angular.filter']);
    </script>
</body>
</html>

UPDATE


Solution:

I found where add the provider. The provider name is a8m.fuzzy.

cloned
  • 6,346
  • 4
  • 26
  • 38
beanic
  • 539
  • 6
  • 22
  • Show your code. – mwilson May 19 '20 at 14:23
  • Can you show your setup? have you followed all the steps. It's working fine for me after following all the steps mentioned in the docs. – palaѕн May 19 '20 at 14:34
  • @palasH I have added the code. Do you know how do it in a javascript file instead of in the html file? – beanic May 19 '20 at 17:10
  • Sure. Could you please first create a small demo for this using [jsfiddle](http://jsfiddle.net/imhassan66/dEFfK/) that would help us to see what you have missed. – palaѕн May 19 '20 at 17:25
  • @palasH sorry but I can't because the data is been taken from a backend. I have found this example in stackoverflow https://stackoverflow.com/questions/14935996/how-to-use-a-filter-in-javascript-instead-of-the-html and is exactly what I need but using the Fuzzy code. – beanic May 19 '20 at 17:29

0 Answers0