加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – 添加ui.bootstrap依赖与bower

发布时间:2020-12-17 08:57:40 所属栏目:安全 来源:网络整理
导读:我试图添加ui.bootstrap依赖关系到我的角项目(我使用yeoman,bower)。 我这样做: yo角 bower安装angular-ui 然后我添加到我的index.html文件:和 grunt服务 然后我添加了ui.bootstrap依赖关系到我的app.js: angular.module('angularuiprojectApp',[ 'ngCoo
我试图添加ui.bootstrap依赖关系到我的角项目(我使用yeoman,bower)。
我这样做:

> yo角
> bower安装angular-ui
>然后我添加到我的index.html文件:和
> grunt服务

然后我添加了ui.bootstrap依赖关系到我的app.js:

angular.module('angularuiprojectApp',[
  'ngCookies','ngResource','ngSanitize','ngRoute','ui.bootstrap'])

当我试图访问我的index.html在Chrome我收到此错误:

Uncaught Error: [$injector:modulerr] Failed to instantiate module
angularuiprojectApp due to: Error: [$injector:modulerr] Failed to
instantiate module ui.bootstrap due to: Error: [$injector:nomod]
Module ‘ui.bootstrap’ is not available! You either ……1)

我不知道我在哪里错了,如果有人可以帮助我这个…
谢谢。

您正在从bower安装错误的软件包。正确的安装是bower install angular-bootstrap,如下所述: https://github.com/angular-ui/bootstrap#installation

编辑:

截至2015年2月,图书馆的Bower版本存在于https://github.com/angular-ui/bootstrap-bower。

不幸的是,它目前只包含AngularUI Bootstrap 0.12.0,据我所知,它不完全兼容Angular> = 1.3。看起来维护者希望AngularUI Bootstrap> = 0.13.0与Angular 1.3兼容,但是该库的版本似乎还没有到达Bower兼容的仓库。不再是问题,AngularUI Bootstrap 0.13.0版本现在提供和支持。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读