Jacob Jacob - 1 year ago 114
Javascript Question

module loading failing with ngRoute

Just started learning angularJs and came across a 'Routing' assignment for practice. Unfortunately i get these error when running the application:

Error 1: Error: $injector:modulerr Module Error

Error 2: Error: $injector:nomad Module Unavailable

This is my code:




I have tried reading other relevant post on SO but without luck.
I've been stuck here for too long so any help is deeply appreciated.


Answer Source

According to your image, you have not defined the module properly, There should be a , after the module name to separate from the dependencies,

Your Module should be like this,

var app = angular.module(mainApp,['ngRoute'])
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download