The Wayback Machine - https://web.archive.org/web/20181102140555/https://github.com/ng-bootstrap/ng-bootstrap
Skip to content
Angular powered Bootstrap https://ng-bootstrap.github.io
Permalink
Failed to load latest commit information.
.github chore: drop plunker support (#2736) Sep 21, 2018
demo docs: update dependencies documentation for 4.0.0 Oct 26, 2018
e2e-app fix(datepicker): focus correct day when opening popup Oct 26, 2018
misc chore(build): support TS 3.1 for doc extraction script Oct 12, 2018
scripts chore: bump saucelabs versions and timeouts Apr 27, 2018
src chore: release 4.0.0 Oct 26, 2018
.clang-format chore: format files with clang Sep 29, 2015
.editorconfig chore: remove end_of_line at editorconfig Nov 4, 2016
.gitattributes chore: normalize line endings Mar 31, 2016
.gitignore chore: add application for e2e tests Aug 28, 2018
.travis.yml chore: use TS for static file generation instead of gulp Oct 12, 2018
CHANGELOG.md chore: release 4.0.0 Oct 26, 2018
CODE_OF_CONDUCT.md chore(coc): add Code of Conduct Sep 30, 2015
CONTRIBUTING.md docs: angular 2 -> angular branding change Feb 2, 2017
DEVELOPER.md chore: add application for e2e tests Aug 28, 2018
LICENSE docs(LICENSE): update copyright year to 2018 Jan 24, 2018
README.md docs: update dependencies documentation for 4.0.0 Oct 26, 2018
angular.json chore: add application for e2e tests Aug 28, 2018
gulpfile.js chore: enable clang-format for e2e tests Oct 13, 2018
package.json chore: release 4.0.0 Oct 26, 2018
tsconfig.json chore: use @angular/cli for build, tests and demo Jul 3, 2018
tslint.json fix(datepicker): fix 'util' import and use 'isInteger' (#2738) Sep 21, 2018
yarn.lock chore: bump dependencies to Angular 7.0.0 and rxjs 6.3.0 Oct 26, 2018

README.md

NG Bootstrap - Angular directives specific to Bootstrap 4

npm version Build Status devDependency Status Sauce Test Status

Welcome to the Angular version of the Angular UI Bootstrap library. This library is being built from scratch by the ui-bootstrap team. We are using TypeScript and targeting the Bootstrap 4 CSS framework.

As with Bootstrap 4, this library is a work in progress. Please check out our list of issues to see all the things we are implementing. Feel free to make comments there.

Table of Contents

Demo

View all the directives in action at https://ng-bootstrap.github.io

Dependencies

The only two dependencies are Angular and Bootstrap 4 CSS. Here is the list of minimal required versions:

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
4.x.x 7.0.0 4.0.0

Installation

After installing the above dependencies, install ng-bootstrap via:

npm install --save @ng-bootstrap/ng-bootstrap

Once installed you need to import our main module:

import {NgbModule} from '@ng-bootstrap/ng-bootstrap';

@NgModule({
  ...
  imports: [NgbModule, ...],
  ...
})
export class YourAppModule {
}

Alternatively you could only import modules with components you need, ex. pagination and alert. The resulting bundle will be smaller in this case.

import {NgbPaginationModule, NgbAlertModule} from '@ng-bootstrap/ng-bootstrap';

@NgModule({
  ...
  imports: [NgbPaginationModule, NgbAlertModule, ...],
  ...
})
export class YourAppModule {
}

SystemJS

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:

map: {
  '@ng-bootstrap/ng-bootstrap': 'node_modules/@ng-bootstrap/ng-bootstrap/bundles/ng-bootstrap.js',
}

Supported browsers

We support the same browsers and versions supported by both Bootstrap 4 and Angular, whichever is more restrictive. See this for up-to-date Angular browser support.

  • Chrome (45+)
  • Firefox (40+)
  • IE (10+)
  • Edge (20+)
  • Safari (7+)

Also check Bootstrap 4's notes on browsers support.

Contributing to the project

Please check the CONTRIBUTING.md doc for contribution guidelines.

Getting Help

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 maintainers are looking at questions tagged with ng-bootstrap.

StackOverflow is a much better place to ask questions since:

  • there are hundreds of people willing to help on StackOverflow
  • questions and answers stay available for public viewing so your question / answer might help someone else
  • SO voting system assures that the best answers are prominently visible.

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.

You think you've found a bug?

Oh, we are ashamed and want to fix it ASAP! But before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using https://stackblitz.com. Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:

  • version of Angular used
  • version of this library that you are using
  • 3rd-party libraries used, if any
  • and most importantly - a use-case that fails

A minimal reproduce scenario using https://stackblitz.com allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem. The best part is that you do not need to create StackBlitzes from scratch - you can fork one from our demo page.

We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal StackBlitz. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.

Unfortunately we are not able to investigate / fix bugs without a minimal reproduce scenario using https://stackblitz.com, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.

Code of Conduct

Please take a moment and read our Code of Conduct

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.