Unknown provider: ifFilterProvider - non-angular ifFilter

1

I have following in my app.js

(function(){    
  'use strict';    
  angular
 .module('app', ['ngResource','ngRoute'])
 .config(function ($routeProvider) {
    $routeProvider
        .otherwise({
            redirectTo: '/'
        });
 })
 .controller('AppCtrl', ["$scope", "$rootScope", "$location", "$timeout",
    function($scope, $rootScope, $location, $timeout) {
    }]);    
}());

My html:

<html lang="pt-br">

    <head>
    </head>

    <body ng-app="app" ng-controller="AppCtrl">
    </body>

</html>

But when I start the application the following message appears:

Error: [$injector:unpr] Unknown provider: ifFilterProvider <- ifFilter

Has anyone ever had a similar problem?

    
asked by anonymous 22.08.2014 / 00:26

1 answer

1

According to the documentation, you should inject the $ routeProvider in this way:

.config(['$routeProvider', function ($routeProvider) {
  $routeProvider
       .otherwise({
          redirectTo: '/'
   });
}])

In this link you can follow step by step how to do: link

I hope I have helped

    
22.08.2014 / 01:04