ng2-bootstrap
Native Angular2 directives for Bootstrap, works with Bootstrap 3 and 4-alfa
Follow me to be notified about new releases.
Usage & Demo
http://valor-software.github.io/ng2-bootstrap/
here
If you need more modules checkStarter packages
Hint: simpliest way to add styles is a CDN:
<!-- index.html -->
angular2-quickstart
With system.js:AngularClass/angular2-webpack-starter
With webpack:- install
ng2-bootstrap
and typings formoment.js
npm install ng2-bootstrap --save # Install typings from NPM. Ambient typings will not help typings install moment --save
- add some code
<!-- src/app/home/home.html --> Hello from ng2-bootstrap {{ date.toDateString() }}
/* src/app/home/home.ts */ ; ... @ date: Date = ;
pkozlowski-opensource/ng2-play or mgechev/angular2-seed
With gulp and system.js:- hint: see
quickstart
section below for samples - just add link to
ng2-bootstrap
system.js
bundle toindex.html
like in angular2-quickstart - and
moment.js
map insystem.js
configuration
Install from npm
npm i ng2-bootstrap --save
Install from CDN
Check cdnjs to include ng2-bootstrap
as system.js
bundle
Quick start
Hint: you can just clone angular2-quickstart
If you are following Angular2 5 min quickstart guide, just add one line
<!-- index.html -->
As for now datepicker
is using moment.js
to format date, so please update system.js
config to contain mapping:
<!-- index.html --> System.config({ packages: { app: { format: 'register', defaultExtension: 'js' } }, map: { moment: 'node_modules/moment/moment.js' } });
And update your app.component.ts
to have following content:
;;
And you are ready to go! :)
API
Check demo for API documentation
Contribution
Please read central ng2
modules readme for details, plans and approach and welcome :)
Credits
Crossbrowser testing sponsored by Browser Stack