引导3与目前AngularJS引导指令兼容? [英] Bootstrap 3 compatible with current AngularJS bootstrap directives?

查看:140
本文介绍了引导3与目前AngularJS引导指令兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将引导3版本与当前AngularJS引导指令兼容?

我想用引导2.3.1指令与AngularJS:

I want to use Bootstrap 2.3.1 directive with AngularJS:

http://angular-ui.github.io/bootstrap/

自举3.0.0 CSS:

With the Bootstrap 3.0.0 CSS:

<一个href=\"https://github.com/twitter/bootstrap/tree/3.0.0-wip/\">https://github.com/twitter/bootstrap/tree/3.0.0-wip/

为什么?

AngularJS团队一直都在致力于JS指令为V2.3.1,需要时间来赶上V3.0.0。我想现在就开始使用V3的CSS语法格

AngularJS team is still working on JS directives for v2.3.1 and will need time to catch up to v3.0.0. I want to start using v3 CSS grid syntax now.

<一个href=\"https://github.com/angular-ui/bootstrap/issues/331\">https://github.com/angular-ui/bootstrap/issues/331

推荐答案

因此​​, HTTP://angular-ui.github .IO /引导/ 项目靠引导的JavaScript(它没有包装它,不需要等)。这些都是从地面向上写入是重量轻,很好的融入AngularJS生态系统原生AngularJS指令。

So, the http://angular-ui.github.io/bootstrap/ project does not depend on Bootstrap's JavaScript (it is not wrapping it, not requiring etc.). Those are native AngularJS directives written from the ground-up to be lightweight and well integrated into the AngularJS ecosystem.

的唯一坚持引导项目引导的标记(HTML)和CSS。

如果你问一个问题:我可以抓住所有的指令和引导3.0使用它们,答案是看情况。这真的取决于是否以及如何引导多少决定3.0不改变它的标记和相应的CSS类。一些控制标记已经改变,而不是为了其他一些我会presume。

If you ask a question "can I grab all the directives and use them with Bootstrap 3.0" the answer is "it depends". It really depends if and how much Bootstrap 3.0 decide do change its markup and corresponding CSS classes. I would presume that markup of some controls have changed and not for some others.

现在,随着 http://angular-ui.github.io/bootstrap/ 非常好的消息是大多数的HTML标记和CSS类的被封装在单独的AngularJS模板。在实践中这意味着你可以抓住的指示和唯一的变化标记(模板)的JavaScript的code,以适应引导3.0。

Now, the very good news with http://angular-ui.github.io/bootstrap/ is that most of the HTML markup and CSS classes are encapsulated in separate AngularJS templates. In practice it means that you can grab the JavaScript code of the directives and only change markup (templates) to fit into Bootstrap 3.0.

所有模板都设在这里:
<一href=\"https://github.com/angular-ui/bootstrap/tree/master/template\">https://github.com/angular-ui/bootstrap/tree/master/template
并通过浏览他们,你应该得到一个想法,它是pretty简单而不使用JavaScript搞乱更新标记。这是该项目的设计目标之一。

All the templates are located here: https://github.com/angular-ui/bootstrap/tree/master/template and by browsing them you should get an idea that it is pretty simple to update markup without messing with JavaScript. This is one of the design goals of this project.

我会鼓励你只需给它一个尝试,看看引导3.0工程与现有的指示和模板如何CSS。如果你发现任何问题,可以随时更新模板来引导3.0(并有助于他们回到项目!)

I would encourage you to simply give it a try and see how CSS of Bootstrap 3.0 works with the existing directives and templates. If you spot any issues you can always update templates to Bootstrap 3.0 (and contribute them back to the project!)

这篇关于引导3与目前AngularJS引导指令兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆