This repository contains a set of native Angular directives based on Bootstrap's markup and CSS. As a result no dependency on jQuery or Bootstrap's JavaScript is required.
Here is a list of minimal required versions of Angular and Bootstrap CSS for ng-bootstrap:
ng-bootstrap | Angular | Bootstrap CSS |
---|---|---|
1.x.x | 5.0.2 | 4.0.0 |
2.x.x | 6.0.0 | 4.0.0 |
3.x.x | 6.1.0 | 4.0.0 |
Should I add bootstrap.js or bootstrap.min.js to my project?
No, the goal of ng-bootstrap is to completely replace JavaScript implementation for components. Nor should you include other dependencies like jQuery or popper.js. It is not necessary and might interfere with ng-bootstrap code.We strive to support the same browsers and versions as supported by both Bootstrap 4 and Angular, whichever is more restrictive. Check browser support notes for Angular and Bootstrap.
Our code is automatically tested on all the supported browsers.
After installing the above dependencies, install ng-bootstrap
via:
Once installed you need to import our main module.
Alternatively you could only import modules with components you need, ex. pagination and alert. The resulting bundle will be smaller in this case.
If you are using SystemJS, you should also adjust your configuration to point to the UMD bundle.
In your SystemJS config file, map
needs to tell the System loader where to look for ng-bootstrap
:
Some components contain static English text or symbols that you might want to internationalize. Some of them appear on the screen, like for example the placeholders used in the timepicker input fields. Others appear in aria attributes used for accessibility.
Internationalizing the ng-bootstrap components is done the same way as for any of your components, using the process described in the Angular documentation. The only difference is that we already did the first phase of this process: marking static text messages in the ng-bootstrap component templates for translation.
So, if you execute `ng xi18n` on your project, you will also find the ng-bootstrap messages to translate in the
generated messages file. All our messages are identified by an ID of the form ngb.[widget].[message]
Please, do not open issues for the general support questions as we want to keep GitHub issues for bug reports
and feature requests. You've got much better chances of getting your question answered on
StackOverflow where the community at large are looking
at questions tagged with ng-bootstrap
.
StackOverflow is a much better place to ask questions since:
To save your and our time we will be systematically closing all the issues that are requests for general support and redirecting people to StackOverflow.
We are always looking for the quality contributions! Please check the Contributing doc for contribution guidelines. Additionally, for local building and testing information, please see our Developer's Guide.
Please take a moment to read our Code of Conduct.