Beta 14: unknown provider $filterProvider

Hi all,

After updating Ionic to beta 14 (local) I cannot start the application because of the following error:

Uncaught Error: [$injector:modulerr] Failed to instantiate module ng due to:
Error: [$injector:unpr] Unknown provider: $filterProvider
http://errors.angularjs.org/1.3.6/$injector/unpr?p0=%24filterProvider
at REGEX_STRING_REGEXP (http://localhost:8100/lib/ionic/js/ionic.bundle.js:7888:12)
at http://localhost:8100/lib/ionic/js/ionic.bundle.js:11806:19
at Object.getService [as get] (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11953:39)
at runInvokeQueue (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11898:43)
at http://localhost:8100/lib/ionic/js/ionic.bundle.js:11908:11
at forEach (http://localhost:8100/lib/ionic/js/ionic.bundle.js:8147:20)
at loadModules (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11890:5)
at createInjector (http://localhost:8100/lib/ionic/js/ionic.bundle.js:11816:11)
at doBootstrap (http://localhost:8100/lib/ionic/js/ionic.bundle.js:9263:20)
at bootstrap (http://localhost:8100/lib/ionic/js/ionic.bundle.js:9284:12)
http://errors.angularjs.org/1.3.6/$injector/modulerr?p0=ng&p1=Error%3A%20%5…%3A%2F%2Flocalhost%3A8100%2Flib%2Fionic%2Fjs%2Fionic.bundle.js%3A9284%3A12)

I don’t inject $filterProvider anywhere myself, so it must be something else.

How do I resolve this?

Are you including any external dependencies?
Can you provide a codepen with this error?
Theres a lot that could be going on here.

I found what was happening, it was due to the update of Angular as it states on its website:

This error can also occur if you have tried to add your own components to the ng module. This has never been supported and from 1.3.0 it will actually trigger this error. For instance the following code could trigger this error.

angular.module('ng').filter('tel', function (){});

Instead create your own module and add it as a dependency to your application’s top-level module. See #9692 and #7709 for more information

1 Like

This is the issue that I am facing.