0

I've used this example in my project. (It's the groupBy: 'team' clause that I'm trying to make it work)

The dependency in question is angular-filter

http://jsbin.com/weyov/45/edit?html,js,output

The difference in my code from the linked example is that I'm bootstrapping angular module so I'm getting injector errors. (I've tried to use ng-filter)

var app = angular.module("announcements", ["ng-filter"]);
app.controller("Controller", function($scope, $http) {

});

angular.bootstrap(document.getElementById("announcements"), ["announcements"]);

I believe I've to pass something in the angular.module but not sure what value. Please advise.

Angular Error Page

2
  • It say you need to inject angular.filter and you're injecting ng-filter? Commented Mar 4, 2016 at 19:44
  • Instead of posting a jsbin of code that works fine, but isn't yours, post a jsbin of your code, that doesn't work. Commented Mar 4, 2016 at 19:46

1 Answer 1

1

The module you linked to here angular-filter has a module named angular.filter, not ng-filter like you have in your post. The following should get rid of your injector errors

var app = angular.module("announcements", ["angular.filter"]);  //changed from ng-filter
app.controller("Controller", function($scope, $http) {

});

angular.bootstrap(document.getElementById("announcements"), ["announcements"]);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.