Home Angular $filters is not defined
Reply: 0

Angular $filters is not defined

Orel Offir
1#
Orel Offir Published in 2017-12-07 17:15:30Z

I'm trying to use filters in my project (doesn't really matter which one ) but I'm keep getting an error of : "angular.js:14794 ReferenceError: $filters is not defined"

This is my main.js

var app = angular.module("main", ["ngRoute"]);

app.config(function ($routeProvider, $httpProvider) {
    $httpProvider.defaults.withCredentials = true;
    $routeProvider.when('/', {
        templateUrl: 'angular/templates/pages/home.html',
        controller: 'homeController'
    }).when('/tables', {
        templateUrl: 'angular/templates/pages/tables.html',
        controller: 'tablesController'
    })
});
app.controller("indexController", function($scope){
    $scope.Name = 'Orel Offir'
    $scope.Role = 'Web Designer'
    $scope.currentPage = 'home';
    $scope.setCurrentPage = function (pageName) {
        $scope.currentPage = pageName;
    }
});

and this is the location i'm trying to use filter:

<tr ng-repeat="log in logs">
    <td>{{log._id | uppercase}}</td>
    <td>{{log.EventId}}</td>
    <td>{{log.Computer}}</td>
    <td>{{log.TimeCreated}}</td>
    <td>{{log.IpAddress}}</td>
    <td>{{log.FailureReason}}</td>
    <td>{{log.TargetUserName}}</td>
    <td>{{log.SubjectUserName}}</td>
</tr>
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.343304 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO