bootstrap README

The project's README from github.com/angular-ui/bootstrap. As one markdown file: README.md.

Project Status (please read)

Due to Angular's continued adoption, our creation of the Angular version of this library, and the the project maintainers' moving on to other things, this project is considered feature-complete and is no longer being maintained.

We thank you for all your contributions over the years and hope you've enjoyed using this library as much as we've had developing and maintaining it. It would not have been successful without them.


UI Bootstrap - AngularJS directives specific to Bootstrap

Gitter Build Status devDependency Status CDNJS

Demo

Do you want to see directives in action? Visit https://angular-ui.github.io/bootstrap/!

Angular 2

Are you interested in Angular 2? We are on our way! Check out ng-bootstrap.

Installation

Installation is easy as UI Bootstrap has minimal dependencies - only the AngularJS and Twitter Bootstrap's CSS are required. Notes:

Angular Requirements

Bootstrap Requirements

Install with NPM

$ npm install angular-ui-bootstrap

This will install AngularJS and Bootstrap NPM packages.

Install with Bower

$ bower install angular-bootstrap

Note: do not install 'angular-ui-bootstrap'. A separate repository - bootstrap-bower - hosts the compiled javascript file and bower.json.

Install with NuGet

To install AngularJS UI Bootstrap, run the following command in the Package Manager Console

PM> Install-Package Angular.UI.Bootstrap

Custom build

Head over to https://angular-ui.github.io/bootstrap/ and hit the Custom build button to create your own custom UI Bootstrap build, just the way you like it.

Manual download

After downloading dependencies (or better yet, referencing them from your favorite CDN) you need to download build version of this project. All the files and their purposes are described here: https://github.com/angular-ui/bootstrap/tree/gh-pages#build-files Don't worry, if you are not sure which file to take, opt for ui-bootstrap-tpls-[version].min.js.

Adding dependency to your project

When you are done downloading all the dependencies and project files the only remaining part is to add dependencies on the ui.bootstrap AngularJS module:

angular.module('myModule', ['ui.bootstrap']);

Webpack / JSPM

To use this project with webpack, follow the NPM instructions. Now, if you want to use only the accordion, you can do:

import accordion from 'angular-ui-bootstrap/src/accordion';

angular.module('myModule', [accordion]);

You can import all the pieces you need in the same way:

import accordion from 'angular-ui-bootstrap/src/accordion';
import datepicker from 'angular-ui-bootstrap/src/datepicker';

angular.module('myModule', [accordion, datepicker]);

This will load all the dependencies (if any) and also the templates (if any).

Be sure to have a loader able to process css files like css-loader.

If you would prefer not to load your css through your JavaScript file loader/bundler, you can choose to import the index-nocss.js file instead, which is available for the modules:

The other modules, such as accordion in the example below, do not have CSS resources to load, so you should continue to import them as normal:

import accordion from 'angular-ui-bootstrap/src/accordion';
import typeahead from 'angular-ui-bootstrap/src/typeahead/index-nocss.js';

angular.module('myModule', [accordion, typeahead]);

Versioning

Pre-2.0.0 does not follow a particular versioning system. 2.0.0 and onwards follows semantic versioning. All release changes can be viewed on our changelog.

Support

FAQ

https://github.com/angular-ui/bootstrap/wiki/FAQ

Code of Conduct

Take a moment to read our Code of Conduct

PREFIX MIGRATION GUIDE

If you're updating your application to use prefixes, please check the migration guide.

Supported browsers

Directives from this repository are automatically tested with the following browsers:

Modern mobile browsers should work without problems.

Need help?

Need help using UI Bootstrap?

Please do not create new issues in this repository to ask questions about using UI Bootstrap

Found a bug?

Please take a look at CONTRIBUTING.md and submit your issue here.


Contributing to the project

We are always looking for the quality contributions! Please check the CONTRIBUTING.md for the contribution guidelines.

Development, meeting minutes, roadmap and more.

Head over to the Wiki for notes on development for UI Bootstrap, meeting minutes from the UI Bootstrap team, roadmap plans, project philosophy and more.

bootstrap (angular-ui/bootstrap)

Searching Database…

14.1K ·GitHub
archived
这是什么?UI Bootstrap 是一个原生 AngularJS 指令库,用来实现 Bootstrap 组件,因此无需 jQuery 或 Bootstrap 的 JS 文件,就能使用手风琴、模态框、工具提示等组件。
它是一个框架,还是只是一组控件?它是一个 AngularJS 指令库,每个组件对应一个模块(手风琴、轮播、日期选择器、模态框、工具提示、自动完成等),你可以把它作为依赖添加到自己的 AngularJS 应用中。
我该怎么把它添加到项目里?可以通过 NPM、Bower 或 NuGet 安装,也可以构建自定义包,然后在你的 AngularJS 应用模块中把 'ui.bootstrap' 添加为依赖;如果使用 Webpack/JSPM,则只需导入你需要的模块,例如只导入 accordion 模块。
除了这个库,我还需要别的什么吗?需要 AngularJS 1.4.x 及以上版本和 Bootstrap CSS 3.x 及以上版本;过渡和动画需要 ngAnimate,滑动手势需要 ngTouch,但不需要 jQuery,也不需要 Bootstrap 自身的 JS。
这个项目还在维护吗?否——该项目已归档,并明确标注为功能已完备、不再维护;团队建议想使用新版 Angular 的 AngularJS 用户改用 ng-bootstrap。
现在还有谁应该使用它?只有那些仍在维护现有 AngularJS(1.x)代码库、且已在使用 Bootstrap CSS 的团队;新项目应考虑 ng-bootstrap 或现代 Angular 的替代方案。
我能只引入某一个组件,而不是整个库吗?可以。使用 Webpack/JSPM 时,你可以只导入单个模块,例如只导入手风琴(accordion),它只会引入该模块所需的依赖和模板。
支持哪些浏览器?这些指令已在 Chrome(稳定版和 Canary 版)、Firefox、IE 9 和 IE 10、Opera 以及 Safari 上测试过,应该也能在现代移动浏览器上运行。
Creator
angular-ui
Size
9.7 MB
Stars
14.1K
Age
14y
Commits · 90 Days