admin管理员组

文章数量:1313121

I put angular-filters in my application.js, but I still get the error:

Unknown provider: defaultFilterProvider <- defaultFilter

How do I fix this?

I put angular-filters in my application.js, but I still get the error:

Unknown provider: defaultFilterProvider <- defaultFilter

How do I fix this?

Share Improve this question edited Mar 9, 2013 at 19:11 mkelley33 asked Mar 9, 2013 at 19:06 mkelley33mkelley33 5,60110 gold badges50 silver badges74 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 9

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./frapontillo/angular-filters/blob/master/test/default/defaultSpec.js

本文标签: