Saturday, May 25, 2024
 Popular · Latest · Hot · Upcoming
30
rated 0 times [  31] [ 1]  / answers: 1 / hits: 173044  / 11 Years ago, wed, august 28, 2013, 12:00:00

I received this error upon upgrading from AngularJS 1.0.7 to 1.2.0rc1.


More From » angularjs

 Answers
16

The ngRoute module is no longer part of the core angular.js file. If you are continuing to use $routeProvider then you will now need to include angular-route.js in your HTML:



<script src=angular.js>
<script src=angular-route.js>


API Reference



You also have to add ngRoute as a dependency for your application:



var app = angular.module('MyApp', ['ngRoute', ...]);


If instead you are planning on using angular-ui-router or the like then just remove the $routeProvider dependency from your module .config() and substitute it with the relevant provider of choice (e.g. $stateProvider). You would then use the ui.router dependency:



var app = angular.module('MyApp', ['ui.router', ...]);

[#76080] Tuesday, August 27, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
elliem

Total Points: 415
Total Questions: 117
Total Answers: 94

Location: American Samoa
Member since Fri, Aug 26, 2022
2 Years ago
;