I'm encountering the error mentioned in the title repeatedly. I've attempted to troubleshoot by consulting Angular documentation, but everything seems to be set up correctly.
In my project, I have 3 modules: App.js, planCtrl.js, and gservice.js, which are included as follows:
index.html
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Google Libraries -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<script src="https://code.angularjs.org/1.5.0/angular.min.js"></script>
<script src="https://code.angularjs.org/1.5.0/angular-route.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular-cookies.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular-messages.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.1.2/ui-bootstrap-tpls.js"></script>
<script src="js/app.js"></script>
<script src="js/planCtrl.js"></script>
<script src="js/gservice.js"></script>
app.js
var chaloApp = angular
.module('chaloApp', [
'planCtrl', 'gservice', 'ngCookies',
'ngRoute', 'ngMessages', 'ui.bootstrap'
]);
plan.js
var planCtrl = angular.module('planCtrl', ['gservice']);
planCtrl.controller('planController', ['$scope', '$rootScope', '$http', '$cookies', '$location ', '$compile', '$uibModal', 'gservice', function($scope, $rootScope, $http, $cookies, $location, $compile, $uibModal, gservice){
gservice.js
angular.module('gservice', [])
.factory('gservice',['$scope','$rootScope','$http',function($scope,$rootScope,$http){
If more details are needed, below is the complete error message:
Error: [$injector:unpr] http://errors.angularjs.org/1.5.0/$injector/unpr?p0=<div class="routePages ng-scope" ng-view="">copeProvider%20%3C-%20%24scope%20%3C-%20gservice
at Error (native)
at https://code.angularjs.org/1.5.0/angular.min.js:6:416
... More error stack trace ...
I've been struggling with this issue for a while now, so any assistance would be greatly appreciated.
Thank you,