I am trying to add a new page to my website ( it was developed by somebody else ) and when I add another block to the route I just get an error like:
Error: [$injector:modulerr] Failed to instantiate module nameApp due to: [$injector:nomod] Module 'nameApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.3.12/$injector/nomod?p0=nameApp
My routing config:
.config(
function($routeProvider, $locationProvider)
{
$routeProvider
.when('/home', {
templateUrl: 'templates/home.html',
title: 'Home',
controller: 'HomeController',
reloadOnSearch: false
})
.when('/about', {
templateUrl: 'templates/about.html',
reloadOnSearch: false
})
.otherwise({ redirectTo: '/404' });
$locationProvider.html5Mode(true);
}
)
I do not have any problems with this configuration as it loads ok in the Web Browser, but when I'm trying to add:
.when('/donate', {
templateUrl: 'templates/donate.html',
reloadOnSearch: false
})
I receive the above error. ( I have also created the donate.html file )
index.html
<li>
<a ng-class="getClass('/')" title="Home" href="/">Home</a>
</li>
<li>
<a ng-class="getClass('/about')" title="About Us" href="/about">About Us</a>
</li>
<li>
<a ng-class="getClass('/donate')" title="Donate" href="/donate">Donate</a>
</li>
Any help about what is this happening and how could I get rid of that error ? As a mention, when I receive that error, the webpage looks like a mess.
nameApp?nameAppmodule.