Jacob Jacob - 2 months ago 6x
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.



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'])