结合 AngularJS 和 Twitter Bootstrap 的最佳方式 [英] Best way to combine AngularJS and Twitter Bootstrap

查看:25
本文介绍了结合 AngularJS 和 Twitter Bootstrap 的最佳方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 AngularJS 和 Twitter Bootstrap 结合到一个全新的网络应用程序中.似乎 AngularJS 指令已经为 Bootstrap 编写.

I would like to combine AngularJS and Twitter Bootstrap into a fresh web app. It seems like AngularJS directives have been written for Bootstrap.

然而,仔细观察,这些指令似乎并没有涵盖所有 Bootstrap.我可以将 AngularUI Bootstrap 代码与原始 Bootstrap 结合起来以获得完整性吗?一开始可以做吗?

However, on careful look, it seems that these directives don't cover all of Bootstrap. Can I combine both the AngularUI Bootstrap code with the original Bootstrap to get completeness? Can it be done in the first place?

我偶然发现了另一个名为 AngularStrap 的 Angular 项目.我可以将这三者结合起来吗?

I stumbled on another Angular project called AngularStrap. Can I combine all three?

结合 AngularJS 和 Twitter Bootstrap 以获得完整性的最佳方法是什么?

What is the best way to combine AngularJS and Twitter Bootstrap to get completeness?

推荐答案

通常,Bootstrap 的 CSS 部分与 AngularJS 的工作方式与 Bootstrap JavaScript 的工作方式完全相同.所以只要你只想用Bootstrap CSS就不用考虑了.

Generally, the CSS part of Bootstrap works exactly the same way with AngularJS as it works with the Bootstrap JavaScript. So as long as you only want to use Bootstrap CSS, you do not have to think about it.

对于几乎所有的 Bootstrap JavaScript 功能,AngularUI 提供了一种替代方法.例如.导航栏通常仅适用于 CSS,因此只需查看 Bootstrap 文档并实现它.如果您需要导航栏的一些响应功能,您将需要 collapse 指令;有关示例,请参见此处:angular-ui navbar

For almost all of the Bootstrap JavaScript functionality, AngularUI provides an alternative approach. E.g. the navbar in general works with CSS only, so just look at the Bootstrap docs and implement it. If you require some responsive features for the navbar, you will require the collapse directive; for an example see here: angular-ui navbar

因此,如果您认为 AngularUI 中缺少任何内容,您能否更具体地说明不够完整,无法涵盖整个 Twitter Bootstrap"?我没有普遍的差距.

So if you think anything is missing in AngularUI, could you please be more specific with "are not complete enough to cover the entire Twitter Bootstrap"? I do not have the impression that there is a general gap.

此外,http://angular-ui.github.io/bootstrap/是该任务最成熟的库.因此,如果您认为缺少某些功能,我强烈建议您对其进行修补并提出拉取请求.

Moreover, http://angular-ui.github.io/bootstrap/ is the most mature library for the task. So if you think there are features missing, I would strongly recommend to patch it and make a pull request.

这篇关于结合 AngularJS 和 Twitter Bootstrap 的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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