连接最多AngularUI来引导3投掷的错误最多、错误、AngularUI

2023-09-13 04:09:15 作者:︶尛馋貓"

我一直在试图线了AngularUI来引导3无济于事。我一把抓起引导3支在这里适当AngularUI code: https://github.com/angular-ui/bootstrap/tree/bootstrap3_bis2

I have been trying to wire up AngularUI to Bootstrap 3 to no avail. I grabbed the appropriate AngularUI code from the bootstrap 3 branch here: https://github.com/angular-ui/bootstrap/tree/bootstrap3_bis2

我选择了AngularUI提示指令作为一种简单的测试案例,看看我能得到它的所有接线。

I picked the AngularUI tooltip directive as an easy "test-case" to see if I can get it all wired up.

有错误我收到的是:未捕获的错误:没有模块:ui.bootstrap

There error I am receiving is: Uncaught Error: No module: ui.bootstrap

我分享下面的src code Dropbox的链接。

I've shared a dropbox link with src code below.

Views/Home/index.cshtml contains the markup with references to angularjs and bootstrap
js/directives contains the only directive I am currently testing out which is the "tooltip" directive.

Dropbox的与SRC code链接 https://www.dropbox.com/sh/elwn0su5qwnqa27/zetaMxAa4Q

而不是我不得不手动下载引导3的指令,并将其放置在我的项目,有没有现在可供AngularUI-Bootstrap3指令CDN像有是AngularUI-Bootstrap2?

Instead of my having to download the bootstrap 3 directives and place them manually in my project, is there now a CDN available for AngularUI-Bootstrap3 directives like there is for AngularUI-Bootstrap2?

感谢您的帮助,

V / R

克里斯

推荐答案

这是因为您尝试提取只有一个AngularUI来源一部分,而不是编译版本。

It's because you try to extract only one part of AngularUI sources, not compiled version.

所以,你缺乏'ui.bootstrap模块声明(和其他肯定件)。

So you lack the module declaration for 'ui.bootstrap' (and surely other pieces).

自举3兼容不这样做,有这个AngularUI版本没有编译的版本(并没有更多的CDN)。

As Bootstrap 3 compatibility is not done, there is no compiled version (and no more CDN) for this AngularUI version.

您必须获得分支bootstrap3_bis2所有来源,并与咕噜建立他们。这解释了项目的自述(特约项目>版本)。

You have to get all sources from branch bootstrap3_bis2, and build them with grunt. It's explain in project README (Contributing to the project > Build).

这将产生2 JS文件(一个是缩小的,另一种是没有),你必须包括你的页面其中之一,它会正常工作。

It will generate 2 JS files (one is minified and the other is not) you have to include one of them to your page and it will works correctly.