HTML
<!DOCTYPE html>
<html ng-app="adaniapp">
<head>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/font-awesome.css" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<div id="main">
<div ng-view></div>
</div>
<script src="js/angular.min.js"></script>
<script src="js/angular-route.js"></script>
<script src="js/angular-resource.min.js"></script>
<script src="js/app.js"></script>
</body>
</html>
Javascript
var adaniapp = angular.module('adaniapp', ['ngRoute','ngResource']);
// configure our routes
adaniapp.config(['$scope', '$routeProvider', '$resource',function($scope, $routeProvider, $resource) {
$routeProvider
// route for the home page
.when('/', {
templateUrl : 'page/login.html',
controller : 'mainController'
})
// route for the about page
.when('/home', {
templateUrl : 'page/home.html',
controller : 'HomeController'
})
// route for the contact page
.when('/meter', {
templateUrl : 'page/meter.html',
controller : 'MeterController'
})
.when('/viewbill', {
templateUrl : 'page/viewbill.html',
controller : 'ViewbillController'
});
}]);
// create the controller and inject Angular's $scope
adaniapp.controller('mainController',['$scope', '$routeProvider', '$resource', function($scope, $routeProvider, $resource) {
}]);
adaniapp.controller('HomeController',['$scope', '$routeProvider', '$resource', function($scope, $routeProvider, $resource) {
}]);
adaniapp.controller('MeterController',['$scope', '$routeProvider', '$resource', function($scope, $routeProvider, $resource) {
}]);
adaniapp.controller('MeterController',['$scope', '$routeProvider', '$resource', function($scope, $routeProvider, $resource) {
}]);
included ng-resource.js file and route.js file are included in index.html, but still its showing error in my console as
"Error: [$injector:modulerr] http://errors.angularjs.org/1.3.15/$injector/modulerr?p0="
all controller included.