0x800a139e - JavaScript runtime error: [$injector:modulerr]

Posted by Sheonarayan under Error and Solution on 1/31/2014 | Points: 10 | Views : 14643 | Status : [Administrator] | Replies : 0

Problem


I was getting following error while working with routeProvider in AngularJS.

---------------------------------
Unhandled exception at line 29, column 395 in http://localhost:33584/Scripts/AngularJS-1.2.10.js

0x800a139e - JavaScript runtime error: [$injector:modulerr]
---------------------------------

Solution


This is because routeProvider is now a separate .js file and the below code snippet is not supported unless you had this script file.


var registrationModule = angular.module("registrationModule", ['ngRoute'])
.config(function ($routeProvider, $locationProvider) {
$routeProvider.when('/Registration/Courses', { templateUrl: '/Templates/courses.html', controller: 'CoursesController' });
$locationProvider.html5Mode(true);
});


The routeProvider .js file is http://code.angularjs.org/1.2.10/angular-route.min.js

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com



Responses

(No response found.)

Login to post response