Angular JS: Why angular-filters errors with Unknown provider: defaultFilterProvider <- defaultFilter?

angularjs, javascript, ruby-on-rails

Solution

Although I'd already included angular-filters in my application, I had forgotten to add them to my requires array like so:

var myApp = angular.module("MyApp", ["ngResource", "ex.filters"]);

To get the angular-filters to work I had to put "ex.filters" in the array as shown above.

I discovered the solution by reading the tests at https://github.com/frapontillo/angular-filters/blob/master/test/default/defaultSpec.js

Problem

I put angular-filters in my application.js, but I still get the error: ``` Unknown provider: defaultFilterProvider <- defaultFilter ``` How do I fix this?

Original source