I'm currently trying to diagnose the reason behind this error message that keeps popping up:
Uncaught Error: [$injector:modulerr]
Here's the code snippet from my index.html file:
<!DOCTYPE html>
<html ng-app="MainApp">
<head>
<meta charset="utf-8">
<link rel='stylesheet' type='text/css' href='core/sty.css'>
<script src="core/CS/ang/angular.min.js"></script>
<script src="core/CS/ang/angular-resource.min.js"></script>
<script src="core/CS/ang/angular-route.min.js"></script>
</head>
<body>
<div id="header-cont">
<div id="header">
<ul style="list-style:none;">
<li style="display:inline;float:left;"><font style="font-size:38px;top:-5px;left:-1px;position:fixed;">title</font></li>
<li class="menu">News</li>
<li class="menu"><ul class="sub-menu">
<a href="/admin/login"><li class="SMoption">1 First login</li></a>
<a href="/admin/register"><li class="SMoption">2 Duble register</li></a>
</ul>account</li>
</ul>
</div>
</div>
<ng-view></ng-view>
<script src="core/CS/mainscript.js"></script>
<script src="core/CS/config.js"></script>
<script src="core/CS/controllers.js"></script>
<script src="core/CS/modules.js"></script>
</body>
</html>
Let's take a look at mainscript.js:
'use strict';
var appv = angular.module("MainApp", ['ngRoute','ngResource']);
And now, config.js:
'use strict';
appv.config(function($routeProvider) {
$routeProvider.
when('/', {
//controller: 'HomeController',
templateUrl: 'views/home.html'
}).
when('/page/:pgId', {
//controller: 'PageController',
templateUrl: 'views/page.html'
}).
when('/article/:pgId/:artId', {
//controller: 'ArticleController',
templateUrl: 'views/article.html'
}).
when('/admin/:adCode', {
//controller: 'AdminController',
templateUrl: 'views/admin.html'
}).
otherwise({templateUrl: 'views/home.html'});
$locationProvider.html5Mode(true);
});
It seems like everything is set up correctly with the inclusion of ng-route.js and ngRoute module, but for some reason it's not functioning as expected...