错误未捕获错误:[$injector:modulerr] angularjs

19 浏览
0 Comments

错误未捕获错误:[$injector:modulerr] angularjs

我正在使用AngularJS路由,但是遇到以下错误...

Angular js


    姓名:{{name}}
    
    
  • {{cust.name|uppercase}}-{{cust.city|lowercase}}

在控制台上报错:

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.12/$injector/modulerr?p0=demoapp&p1=Error%3…0Yb%20(http%3A%2F%2Flocalhost%3A4257%2Fscripts%2Fangular.min.js%3A32%3A232)

0
0 Comments

在使用AngularJS过程中,有时会遇到以下错误信息:Error Uncaught Error: [$injector:modulerr] angularjs。这个错误的出现是由于以下原因:

1. 检查是否在引入angular.js之后引入了angular-route.js。确保引入的顺序是正确的,即先引入angular.js,再引入angular-route.js。



2. 将$routeprovider替换为$routeProvider。在使用服务作为依赖项时,不能使用错误的参数名称进行注入。

通过以上两种方法,我们可以解决这个问题。

0