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 ...
随机推荐
- Numpy 系列(十一)- genfromtxt函数
定义输入 genfromtxt的唯一强制参数是数据的源.它可以是字符串,字符串列表或生成器.如果提供了单个字符串,则假定它是本地或远程文件或具有read方法的打开的类文件对象的名称,例如文件或Stri ...
- python 网络编程之TCP传输&粘包传输
只有TCP有粘包现象,UDP永远不会粘包. 所谓粘包问题主要还是C/S两端数据传输时 因为接收方不知道消息之间的界限,不知道一次性提取多少字节的数据所造成的 根本原因:粘包是由TCP协议本身造成的,T ...
- SpringBoot系列: 设计Restful风格的API
RESTful 架构REST 并非一种技术或规范, 而是一种架构风格, 如果一个架构符合Rest的约束条件和原则, 就可以称作是 RESTful 架构. REST全称是Representational ...
- .NET面试题系列(十七)前端面试
JavaScript js如何实现继承 CSS 行内元素和块状元素的区别 CSS让2个DIV在同一行显示的解决方法 在CSS中,div属于块级元素,每个块级元素默认占一行高度,一行内添加一个块级 ...
- word中中文保持正体,英文用斜体的方法.
有时候,大段的文字中夹杂着英文字母,英文需要斜体,如果一个接一个选中再斜体,费时费力,那么怎样快速实现文斜体中文不斜体呢? 工具/原料 word软件 方法/步骤 选中要修改的段落,替换-查找内容-特殊 ...
- 四十四、Linux 线程——线程同步之死锁以及线程和信号
44.1 死锁 死锁: 两个线程试图同时占有两个资源,并按不同的次序锁定相应的共享资源 解决方式: 按相同的次序锁定相应的共享资源 使用函数 pthread_mutex_trylock(),它是函数 ...
- luogu P5289 [十二省联考2019]皮配
传送门 首先考虑一个正常的dp,设\(f_{i,j,k}\)为前\(i\)个学校,\(j\)人在\(\color{#0000FF}{蓝阵营}\),\(k\)人在\(\color{#654321}{吔} ...
- hibernate之SessionFactory对象
Factory --- 工厂 利用Configuration得到 hibernate3.版本 SessionFactory factory = Configuration.buildSessionFa ...
- python常用校验方法总结
0x00 校验一个字符串是否是合法IP地址 ipv4举例:利用正则表达式来匹配 def checkip(ip): p = re.compile('^((25[0-5]|2[0-4]\d|[01]?\d ...
- torch画散点图
import torch from torch.autograd import Variable import torch.nn.functional as F import matplotlib.p ...