博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
AngularJS 常见错误
阅读量:4288 次
发布时间:2019-05-27

本文共 1684 字,大约阅读时间需要 5 分钟。

一、指定$scope绑定名称写错

angular.js:13642 Error: [$injector:unpr] http://errors.angularjs.org/1.5.6/$injector/unpr?p0=
opeProvider%20%3C-%20%24sope%20%3C-%20AboutController at Error (native) at http://localhost:51706/Scripts/angularjs-1.5.6/angular.min.js:6:412 at http://localhost:51706/Scripts/angularjs-1.5.6/angular.min.js:43:84 at Object.d [as get] (http://localhost:51706/Scripts/angularjs-1.5.6/angular.min.js:40:344) at http://localhost:51706/Scripts/angularjs-1.5.6/angular.min.js:43:146 at d (http://localhost:51706/Scripts/angularjs-1.5.6/angular.min.js:40:344) at e (http://localhost:51706/Scripts/angularjs-1.5.6/angular.min.js:41:78) at Object.instantiate (http://localhost:51706/Scripts/angularjs-1.5.6/angular.min.js:41:445) at http://localhost:51706/Scripts/angularjs-1.5.6/angular.min.js:90:3 at Object.link (http://localhost:51706/Scripts/angularjs-1.5.6/angular-route.min.js:7:274)

二、没有引用Controller.js

错误描述:Error: [ng:areq] http://errors.angularjs.org/1.4.8/ng/areq?p0=HelloCtrl&p1=not%20a%20function%2C%20got%20undefined    at Error (native)    at http://localhost:8080/web/rs/angular.min.js:1:503    at qb (http://localhost:8080/web/rs/angular.min.js:1:8403)    at Qa (http://localhost:8080/web/rs/angular.min.js:1:8490)    at http://localhost:8080/web/rs/angular.min.js:1:38051    at w (http://localhost:8080/web/rs/angular.min.js:1:27806)    at D (http://localhost:8080/web/rs/angular.min.js:1:28162)    at g (http://localhost:8080/web/rs/angular.min.js:1:25189)    at g (http://localhost:8080/web/rs/angular.min.js:1:25206)    at http://localhost:8080/web/rs/angular.min.js:1:24829
Angular出现这种错误的原因,是由于没有在页面中使用模块引入controller导致的

你可能感兴趣的文章
正则表达式入门教程(四)
查看>>
JAVA程序员成长之路的总结
查看>>
javaEE工程师学习路线图
查看>>
java工程师进阶之路
查看>>
linux系统一个tomcat配置两个域名,每个域名对应一个项目
查看>>
javaScript使用Lodop实现网页表格套打功能
查看>>
技术大牛如何寻找下一个风口
查看>>
大数据学习路线大纲
查看>>
html入门之meta
查看>>
Spring源码和jar包下载步骤
查看>>
一位资深程序员大牛给予Java初学者的学习路线建议
查看>>
spring中bean的自动装配和作用域
查看>>
使用http请求,中文乱码问题--解决方法
查看>>
mybatis入门之接口式编程
查看>>
html页面中iframe嵌套页面的父页面和子页面js方法互相调用
查看>>
求字符串中变换位置问题
查看>>
求这个字符串中的最大的数字字符串
查看>>
Spring报错:java.lang.ClassCastException: com.sun.proxy.$Proxy2 cannot be cast to *
查看>>
Java一键启动Linux上的tomcat服务器
查看>>
java实现导出excel表到磁盘上(三)---完整封装,可直接使用
查看>>