live and let live.与民争利的政府必亡
Saturday, 13 August 2016
angular UI Bootstrap
Native AngularJS (Angular) directives for Bootstrap. Smaller footprint (20kB gzipped), no 3rd party JS dependencies (jQuery, bootstrap JS) required. Please read the README.md file before submitting an issue!http://angular-ui.github.io/bootstrap/
Are you interested in Angular 2? We are on our way! Check out ng-bootstrap.
Installation is easy as UI Bootstrap has minimal dependencies - only the AngularJS and Twitter Bootstrap's CSS are required. Notes:
Since version 0.13.0, UI Bootstrap depends on ngAnimate for transitions and animations, such as the accordion, carousel, etc. Include ngAnimate in the module dependencies for your app in order to enable animation.
UI Bootstrap depends on ngTouch for swipe actions. Include ngTouch in the module dependencies for your app in order to enable swiping.
UI Bootstrap 1.0 and higher requires Angular 1.4.x or higher and it has been tested with Angular 1.4.8.
UI Bootstrap 0.14.3 is the last version that supports Angular 1.3.x.
UI Bootstrap 0.12.0 is the last version that supports Angular 1.2.x.
UI Bootstrap requires Bootstrap CSS version 3.x or higher and it has been tested with Bootstrap CSS 3.3.6.
UI Bootstrap 0.8 is the last version that supports Bootstrap CSS 2.3.x.
Install with NPM
$ npm install angular-ui-bootstrap
This will install AngularJS and Bootstrap NPM packages.
Install with Bower
$ bower install angular-bootstrap
Install with NuGet
To install AngularJS UI Bootstrap, run the following command in the Package Manager Console
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:
Webpack / JSPM
To use this project with webpack, follow the NPM instructions. Now, if you want to use only the accordion, you can do: