four four four four -4 years ago 96
AngularJS Question

highlightFilter angularjs error

I'm trying to make a angularjs app but it gives me an error:

Error: [$injector:unpr] http://errors.angularjs.org/1.4.14/$injector/unpr?p0=highlightFilterProvider%20%3C-%20highlightFilter
at http://localhost:63342/AdminLTE-2.3.11/bower_components/angular/angular.min.js:6:417
at http://localhost:63342/AdminLTE-2.3.11/bower_components/angular/angular.min.js:41:240
at Object.d [as get] (http://localhost:63342/AdminLTE-2.3.11/bower_components/angular/angular.min.js:39:220)
at http://localhost:63342/AdminLTE-2.3.11/bower_components/angular/angular.min.js:41:314
at Object.d [as get] (http://localhost:63342/AdminLTE-2.3.11/bower_components/angular/angular.min.js:39:220)
at http://localhost:63342/AdminLTE-2.3.11/bower_components/angular/angular.min.js:150:456
at X (http://localhost:63342/AdminLTE-2.3.11/bower_components/angular/angular.min.js:112:209)
at http://localhost:63342/AdminLTE-2.3.11/bower_components/angular/angular.min.js:110:334
at p (http://localhost:63342/AdminLTE-2.3.11/bower_components/angular/angular.min.js:7:355)
at X (http://localhost:63342/AdminLTE-2.3.11/bower_components/angular/angular.min.js:110:313) <span ng-bind-html="item.id | highlight: $select.search" class="hide">


heres the controller :

angular.module('Dashboard')
.controller('DashboardCtrl',
['$scope', function ($scope) {
var dashboard = this;

dashboard.toto="ddazzzz";
// $scope.vard="ddd";
alert(dashboard.toto);

}]);


i didnt find what is the problem..?

Answer Source

As the error suggests, it appears you are using a highlight filter (probably like {{ ctrl.toto | highlight }}) which is not registered. It should be registered to a module, just like you register your controller.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download