ZedsWhatSheSaid ZedsWhatSheSaid - 6 months ago 23
AngularJS Question

AngularJS Error: [$injector:modulerr]

I have following angular code which is in my

dir in my node project:

var app = angular.module('userContent', ['angularUtils.directives.dirPagination']);

app.controller('MainCtrl', [
$scope.users = []

$scope.addUser = function(){

if(!$scope.user || $scope.user === '') { return; }
user: $scope.user,
vertrag: $scope.vertrag,

$scope.user = '';
$scope.vertrag = '';

This is my html template which is in my
dir in my node project


<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.10/angular-ui-router.js"></script>
<script src="/javascripts/app.js"></script>

<body ng-app="userContent" ng-controller="MainCtrl">

<input ng-model="search">

<table border="1">


<tr dir-paginate="u in users | filter:search | itemsPerPage: 4">
<td>{{ u.user }}</td>
<td>{{ u.vertrag }}</td>



<form ng-submit="addUser()">

<input type="text"
</input> <br>

<input type="text"
</input> <br>

<button type="submit">Submit</button>




I installed following plugin with bower, which I want to use. But I always get this error:

Error: [$injector:modulerr]

Path to my files:



Installing with bower does not mean you are ready to go, it just downloads contents.

You get that error when Angular app cannot find given module, in you case angularUtils.directives.dirPagination.

You have to add js that defines angularUtils.directives.dirPagination module before your app.js in your html.