I followed the ng-grid tutorial found at
After completing all the steps, I encountered the following error in the console:
Error: [$injector:unpr] Unknown provider: gridServiceProvider <- gridService <- homeController
http://errors.angularjs.org/1.3.8/$injector/unpr?p0=gridServiceProvider%20%3C-%20gridService%20%3C-%20homeController
at http://localhost:9000/js/libs.min.js:9269:12
at http://localhost:9000/js/libs.min.js:13200:19
at Object.getService [as get] (http://localhost:9000/js/libs.min.js:13347:39)
at http://localhost:9000/js/libs.min.js:13205:45
...
(error continues)
What could be causing this error? Below is my gridService.js code:
'use strict';
angular.module('angularGruntSeed')
.factory('GridService', ['$http', '$q',
function($http, $q) {
// Code removed for brevity
}
]);
Here is the homeController.js code:
angular.module('angularGruntSeed')
.controller('HomeController', ['$scope', 'GridService',
function($scope, gridService) {
// Code removed for brevity
}
]);
And the app.js code:
'use strict';
// Code removed for brevity
});
The app-routes.js code:
'use strict';
angular.module('angularGruntSeed')
.config(['$routeProvider', function ($routeProvider) {
// Code removed for brevity
}]);
<!doctype html>
<html lang="en" ng-app="angularGruntSeed">
<head>
<title>Angular Grunt Seed Project</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap core CSS -->
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
<link href="../bower_components/ng-grid/ng-grid.css" rel="stylesheet">
<link href="css/starter-template.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
// Code removed for brevity
</body>
</html>