angular.js使用ui-router注入报错,这里是版本问题导致的
报错如下:
common.ts:604Uncaught SyntaxError: Unexpected token ) stateEvents.ts:211Uncaught SyntaxError: Unexpected token ) jquery.js:3827 Uncaught Error: [$injector:modulerr] Failed to instantiate module salesApp due to: Error: [$injector:modulerr] Failed to instantiate module ui.router due to: Error: [$injector:nomod] Module 'ui.router' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument. http://errors.angularjs.org/1.3.20/$injector/nomod?p0=ui.router at http://localhost:9006/bower_components/angular/angular.js:63:12 at http://localhost:9006/bower_components/angular/angular.js:1778:17 at ensure (http://localhost:9006/bower_components/angular/angular.js:1702:38) at module (http://localhost:9006/bower_components/angular/angular.js:1776:14) at http://localhost:9006/bower_components/angular/angular.js:4131:22 at forEach (http://localhost:9006/bower_components/angular/angular.js:326:20) at loadModules (http://localhost:9006/bower_components/angular/angular.js:4115:5) at http://localhost:9006/bower_components/angular/angular.js:4132:40 at forEach (http://localhost:9006/bower_components/angular/angular.js:326:20) at loadModules (http://localhost:9006/bower_components/angular/angular.js:4115:5) http://errors.angularjs.org/1.3.20/$injector/modulerr?p0=ui.router&p1=Error…2F%2Flocalhost%3A9006%2Fbower_components%2Fangular%2Fangular.js%3A4115%3A5)
我这个错误是由于版本问题导致的。版本用的比较老,

加上代码:
"angular-ui-router": "1.0.5"
指定了较低的版本之后可以了。
参考博文:
https://code.angularjs.org/1.3.20/docs/error/$injector/modulerr
https://www.jianshu.com/p/85220470cbfe
angular.js使用ui-router注入报错,这里是版本问题导致的的更多相关文章
- IntelliJ IDEA中Mapper接口通过@Autowired注入报错的正确解决方式
转载请注明来源:四个空格 » IntelliJ IDEA中Mapper接口通过@Autowired注入报错的正确解决方式: 环境 ideaIU-2018.3.4.win: 错误提示: Could no ...
- Ionic之$scope 依赖注入报错
在开发Ionic过程中,发现会报在 LoginController 中引用locals报错,具体报错问题: ionic.bundle.js:19526 Error: [$injector:unpr] ...
- angular : $location & $state(UI router)的关系
次序:angular 的 location会先跑 $rootScope.$on("$locationChangeStart", function (scope, newUrl, o ...
- JS 调试中常见的报错的解决办法
报错:Uncaught SyntaxError: Unexpected token o in JSON at position 1 at JSON.parse (<anonymous>) ...
- [转]html页面调用js文件里的函数报错onclick is not defined处理方法
原文地址:http://blog.csdn.net/ywl570717586/article/details/53130863 今天处理html标签里的onclick功能的时候总是报错:Uncaugh ...
- 小程序使用npm模块(引入第三方UI),报错的多种解决办法。
前言引入第三方模块时,我遇到了很多坑. 首先是微信.第三方模块的文档描述不清楚.其次.搜索到的博客,大部分是抄的文档 / 相互转载抄袭.作用有限. 于是,我自己做了各种条件下的测试.解决各种情况的引入 ...
- 【ActiveMQ】消息生产者自动注入报错:Could not autowire. No beans of 'JmsMessagingTemplate' type found
使用ActiveMQ过程中,定义消息生产者: package com.sxd.jms.producer; import org.springframework.beans.factory.annota ...
- MSSQL手工注入 报错注入方法
例子:www.kfgtfcj.gov.cn/lzygg/Zixun_show.aspx?id=1[1]首先爆版本:http://www.kfgtfcj.gov.cn/lzygg/Zixun_show. ...
- Feign 不能注入报错及接口参数问题
无法实例 解决方案: @EnableFeignClients(basePackages = "com.test.test.service") 要指定路径, 如果有设置@Compon ...
随机推荐
- Eclipse拷贝动态的web工程修改context root的值
Eclipse拷贝动态的web工程修改context root的值 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. context root的名称一般是我们访问URL时的PATH路径 ...
- SNMP学习——v3 VACM
目录: ☆ SNMPv3视图访问控制模型 ☆ SNMPv3报文格式 ☆ VACM参数 ☆ Context Table ☆ Security To Group Table ...
- EF CodeFirst系列(7)---FluentApi配置存储过程
FluentApi配置存储过程 1.EF自动生成存储过程 EF6的CodeFirst开发模式支持给实体的CUD操作配置存储过程,当我们执行SaveChanges()方法时EF不在生成INSERT,UP ...
- win7 远程连接服务器出现身份验证错误,又找不到加密Oracle修正
今天想用远程桌面连接登录服务器,结果,弹出一个错误的提示框:发生身份验证错误,要求的函数不受支持. 然后在网上找了相关的教程,基本上所有的方法都是如下所示: 策略路径:"计算机配置" ...
- Spring Security 之方法级的安全管控
默认情况下, Spring Security 并不启用方法级的安全管控. 启用方法级的管控后, 可以针对不同的方法通过注解设置不同的访问条件. Spring Security 支持三种方法级注解, 分 ...
- LINUX常用操作快捷方式
1. tab 命令补全 这个按键地球人都知道了! 2. Esc+ . 补全最后一次键入的字符 3.Ctrl + a 跳到命令开头 4.Ctrl+e 跳到命令结尾 5 Ctrl+ u 光标处到命令行开 ...
- github及git使用
一.github及git Github用于托管和协作项目的网站,git是通常与github一起使用的版本控制系统.Github上有上百万个开源项目,在使用git的时候每个开发人员都在他们的计算机上有一 ...
- Ubuntu 16.04 总出现红色圆圈警告和检测到系统程序出现问题
这种问题不可忽视!不可忽视!不可忽视!重要的事情说三遍!!!(一次死机,好多文件丢失,真是痛苦的经历) 自从从第三方安装了Python3.6,并将默认3.5改为3.6,导致ubuntu16.04右上角 ...
- 浅谈axios
在我们的项目中有用到: fetch有直接用的,也有自己封装之后用的; vue-resource在vue1的时候使用,把方法抽象出来后,总需要往方法里传 this.$http ,感觉是个超级不爽的设计, ...
- 【原创】大叔经验分享(3)hbase client 如何选择
java中访问hbase有两种方式,一种是hbase自带的client,一种是通过hbase thrift 1 hbase client示例 Configuration conf = HBaseCon ...