Unverified Commit acd560b2 authored by Dmitriy Shekhovtsov's avatar Dmitriy Shekhovtsov Committed by GitHub
Browse files

chore(docs): update readme file for v7 release (#6099)

parent 49bac7b7
Showing with 96 additions and 484 deletions
+96 -484
<a href="http://valor-software.com/ngx-bootstrap/#/">
<h1 align="center">ngx-bootstrap</h1>
<div align="center">
<img class="mx-auto center-block d-block" src="https://valor-software.com/ngx-bootstrap/assets/images/logos/ngx-bootstrap-logo.svg" alt="ngx-bootstrap" width="200" height="200">
<h1>ngx-bootstrap</h1>
</div>
</a>
Server side rendered version of this documentation available
<a href="https://ngx-universal.herokuapp.com/">here</a> served with Angular universal and <a href="https://nestjs.com">nest.js</a>
<p align="center">
Best way to quickly integrate <a href="https://getbootstrap.com/">Bootstrap 3</a> or <a href="https://getbootstrap.com/docs/4.0">Bootstrap 4</a> Components with <a href="https://angular.io/">Angular</a>
......@@ -11,7 +12,6 @@ Best way to quickly integrate <a href="https://getbootstrap.com/">Bootstrap 3</a
<p align="center">
<a href="https://badge.fury.io/js/ngx-bootstrap"><img src="https://badge.fury.io/js/ngx-bootstrap.svg" alt="npm version" ></a>
<a href="https://npmjs.org/ngx-bootstrap"><img src="https://img.shields.io/npm/dm/ngx-bootstrap.svg" alt="npm downloads" ></a>
<a href="https://travis-ci.org/valor-software/ngx-bootstrap"><img alt="" src="https://travis-ci.com/valor-software/ngx-bootstrap.svg?branch=development"></a>
<a target="_blank" href="https://opencollective.com/ngx-bootstrap"><img src="https://opencollective.com/ngx-bootstrap/tiers/backer/badge.svg?label=backer&color=brightgreen" /></a>
<br/>
......@@ -28,24 +28,32 @@ Best way to quickly integrate <a href="https://getbootstrap.com/">Bootstrap 3</a
<!-- [![codecov](https://codecov.io/gh/valor-software/ngx-bootstrap/branch/development/graph/badge.svg)](https://codecov.io/gh/valor-software/ngx-bootstrap) -->
<!-- [![NPM](https://nodei.co/npm/ngx-bootstrap.png?downloads=true&downloadRank=true&stars=true)](https://npmjs.org/ngx-bootstrap)
[![NPM](https://nodei.co/npm-dl/ngx-bootstrap.png?height=3&months=6)](https://npmjs.org/ngx-bootstrap)
[![Sauce Test Status](https://saucelabs.com/browser-matrix/valorkin.svg)](https://saucelabs.com/u/valorkin)
<!-- [![Sauce Test Status](https://saucelabs.com/browser-matrix/valorkin.svg)](https://saucelabs.com/u/valorkin)
-->
## Table of contents
1. [Getting Started](#getting-started)
2. [Supporting](#supporting-ngx-bootstrap)
3. [Installation instructions](#installation-instructions)
4. [Usage & Demo](#usage--demo)
5. [API](#api)
6. [Compatibility](#compatibility)
7. [Troubleshooting](#troubleshooting)
8. [Contributing](#contribution)
2. [Usage & Demo](#usage--demo)
3. [Supporting](#supporting-ngx-bootstrap)
4. [Installation](#installation)
5. [Compatibility](#compatibility)
6. [Troubleshooting](#troubleshooting)
7. [Contributing](#contribution)
8. [Credits](#credits)
9. [License](#license)
## Getting Started
ngx-bootstrap contains all core (and not only) Bootstrap components powered by Angular. So you don't need to include original JS components, but we are using markup and CSS provided by Bootstrap.
ngx-bootstrap provides Bootstrap components powered by Angular, so you don't need to include original JS components.
Check our [Getting started guide](https://valor-software.com/ngx-bootstrap/#/documentation#getting-started) if it's your first project with Angular Bootstrap.
## Usage & Demo
Bootstrap components for Angular applications, dozens of demos and API documentation could be found here:
[https://valor-software.com/ngx-bootstrap/](https://valor-software.com/ngx-bootstrap/).
<!-- Server side rendered version of this documentation available <a href="https://ngx-universal.herokuapp.com/">here</a> served with Angular universal and [nest.js](https://nestjs.com/). -->
## Supporting NGX-Bootstrap
ngx-bootstrap is an Open Source (MIT Licensed) project, it's an independent project with ongoing development made possible thanks to the support of our awesome backers.
......@@ -56,14 +64,22 @@ All donated funds are managed transparently on OpenCollective and will be used s
What's there for you? Proper recognition and exposure of your name/logo/website on our page.
Our main sponsors will be presented under this section! Be the first!
## Installation instructions
##### Method 1
## Installation
##### Angular CLI way
Use the Angular CLI ng add command for updating your Angular project.
```bash
ng add ngx-bootstrap
```
##### Manual way
Install `ngx-bootstrap` from `npm`:
```bash
npm install ngx-bootstrap --save
```
Add needed package to NgModule imports:
Add wanted package to NgModule imports:
```
import { TooltipModule } from 'ngx-bootstrap/tooltip';
......@@ -82,7 +98,7 @@ Add component to your page:
</button>
```
You will need bootstrap styles:
You will need to add bootstrap css:
- `Bootstrap 3`
```
<!-- index.html -->
......@@ -94,24 +110,13 @@ You will need bootstrap styles:
<!--- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
```
##### Method 2
Use the Angular CLI ng add command for updating your Angular project.
```bash
ng add ngx-bootstrap
```
Or use `ng add` to add needed component (for example tooltip).
```bash
ng add ngx-bootstrap --component tooltip
```
Add component to your page:
```
<button type="button" class="btn btn-primary"
tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Simple demo
</button>
```
### Setting up the bootstrap version manually
As you may know `ngx-bootstrap` support several `bootstrap.css` versions at the same time and has automatic tool to guess current used version of library, but if this guess fails you can specify version of `bootstrap.css` manually.
Sometimes, your project might contain some library that could interfere with the bootstrap framework, or you might have a customized version of bootstrap. The consequence is that the process of determining bootstrap version might be failed, which can break the UI. In that case, we can still set the bootstrap version manually in the bootstrapping component (i.e. `AppComponent`):
```
import { setTheme } from 'ngx-bootstrap/utils';
......@@ -125,54 +130,17 @@ export class AppComponent {
}
```
## Usage & Demo
Main source of API documentation and usage scenarios available here:
[https://valor-software.com/ngx-bootstrap/](https://valor-software.com/ngx-bootstrap/).
Additionally you can find demos and docs deployed from latest code with <a href="https://ngx-bootstrap.surge.sh/">angular@latest</a> and <a
href="https://ngx-bootstrap-latest.surge.sh/">angular@next</a>.
Server side rendered version of this documentation available <a href="https://ngx-universal.herokuapp.com/">here</a> served with Angular universal and [nest.js](https://nestjs.com/).
## API
Check demo page for API [reference](https://valor-software.com/ngx-bootstrap/).
### How to use it with:
- `Bootstrap and angular-cli` please refer to [using-with-bootstrap-and-angular-cli](https://github.com/valor-software/ngx-bootstrap/tree/development/docs/getting-started/bootstrap.md)
- `angular-seed` please refer to [getting-started-with-angular-seed](https://github.com/valor-software/ngx-bootstrap/tree/development/docs/getting-started/angular-seed.md)
- `system.js` (and [angular2 quickstart](https://angular.io/docs/ts/latest/quickstart.html)) please checkout [sample repository](https://github.com/valor-software/angular2-quickstart)
- `plnkr` sample available [here](https://plnkr.co/edit/0NipkZrnckZZROAcnjzB?p=preview)
- `AoT using ngc and rollup` please refer to [ngx-bootstrap-with-aot](https://github.com/valor-software/ngx-bootstrap/tree/development/docs/getting-started/aot.md)
- `ASP.NET Core 2.0` please refer to [using-with-asp.net-core-2](https://github.com/csegyud/ASPNETCore_ngx-bootstrap_Sample/blob/master/README.md)
### How to build lib for development
First time:
- clone repository
- `npm install`
- `npm run build`
If you're using Windows, run:
- `npm run build.windows` instead of `npm run build`
- You will have to install [cwRsync](https://en.wikipedia.org/wiki/CwRsync) because one of
the scripts requires `rsync`
To update your fork and prepare it for local usage:
- `git pull upstream development`
- `rm -rf node_modules`
- `npm install`
- `npm run build`
To run the demo:
- `npm run demo.serve` _*// to serve local demo. This is for testing only, without watchers.*_
For local development run:
- `npm run build.watch` _*// in first terminal*_
- `ng serve` _*// in second*_
If you want to run the demo with Angular Universal:
- `npm run demo.serve-universal`
```bash
git clone https://github.com/valor-software/ngx-bootstrap.git
cd ngx-bootstrap
npm ci
npm run build
npm start
```
## Compatibility
......@@ -205,10 +173,6 @@ All contributions very welcome! And remember, contribution is not only PRs and c
Please read our [contribution guidelines](https://github.com/valor-software/ngx-bootstrap/blob/development/CONTRIBUTING.md).
### If you need more modules, check [here](https://github.com/valor-software/ng2-plans)
Please read central `ngx` modules [readme](https://github.com/valor-software/ng2-plans) for details, plans and approach.
### Credits
Crossbrowser testing sponsored by [Saucelabs](https://saucelabs.com/)
[<img src="https://avatars2.githubusercontent.com/u/88837?s=200&v=4" alt="Saucelabs" width="31" height="31">](https://saucelabs.com/)
......
......@@ -14,9 +14,9 @@
- done: with .md
- done: build sass assets
- done: test sauce
3. Drop old versions from gh-pages, keep only latest major versions
3. ~~Drop old versions from gh-pages, keep only latest major versions
manual task, remember about 5.6.0 is actually latest
(@2d) 1 day
(@2d) 1 day~~
4. Split latest and next versions in docs (@2d) 1day
5. Check that it works on npm version script (generate api-docs) (@qa) after we release RC version, deps on #6
5. Review docs (.md)
......
## Steps to install and test with [angular-seed](https://github.com/mgechev/angular-seed)
```bash
npm install --save ngx-bootstrap bootstrap
```
### In `project.config.ts`
```typescript
//uncomment this
import { ExtendPackages } from './seed.config.interfaces';
// Add `NPM` third-party libraries to be injected/bundled.
this.NPM_DEPENDENCIES = [
...this.NPM_DEPENDENCIES,
// {src: 'jquery/dist/jquery.min.js', inject: 'libs'},
// {src: 'lodash/lodash.min.js', inject: 'libs'},
{ src: 'bootstrap/dist/js/bootstrap.min.js', inject: 'libs' },
{ src: 'bootstrap/dist/css/bootstrap.min.css', inject: true }, // inject into css section
// Uncomment when using Bootstrap v3. Bootstrap v4 removed bootstrap-theme
// { src: 'bootstrap/dist/css/bootstrap-theme.min.css', inject: true }, // inject into css section
// { src: 'bootstrap/dist/css/bootstrap-theme.min.css.map', inject: true }, // inject into css section
];
// *towards the bottom, replace extended packages with this:
const additionalPackages: ExtendPackages[] = [
// required for dev build
{
name: 'ngx-bootstrap',
path: 'node_modules/ngx-bootstrap',
packageMeta: {
main: 'bundles/ngx-bootstrap.umd.min.js',
defaultExtension: 'js'
}
},
// required for prod build
{
name: 'ngx-bootstrap/*',
path: 'node_modules/ngx-bootstrap/*',
packageMeta: {
main: 'bundles/ngx-bootstrap.umd.min.js',
defaultExtension: 'js'
}
}
];
this.addPackagesBundles(additionalPackages);
```
### Verify by adding an alert to the home module and html:
#### In `home.module.ts`:
```typescript
import { AlertModule } from 'ngx-bootstrap';
@NgModule({
imports: [CommonModule, HomeRoutingModule, SharedModule, AlertModule.forRoot()],
declarations: [HomeComponent],
exports: [HomeComponent],
providers: [NameListService]
})
```
### In `home.component.html`:
```html
<alert type="success">
<strong>Well done!</strong> You successfully read this important alert message.
</alert>
```
**Big thanks to [Keslavi](https://github.com/keslavi) for contributing to this doc**
# ngx-bootstrap in Angular with AoT compilation using `ngc` and `rollup`
The compilation process described on the [official Angular2 website](https://angular.io/docs/ts/latest/cookbook/aot-compiler.html)
Note that you also have to include bootstrap CSS from the official Bootstrap site or Bootstrap CDN in your index.html HEAD section.
## 1. Install `ngx-bootstrap`
```bash
npm install ngx-bootstrap bootstrap --save
```
## 2. Edit Angular module
Open the module file where you want to include ngx-bootstrap (most probably `app.module.ts`) and import either specific ngx-bootstrap modules by listing them in the import statement. Then in the import array of the Angular module add:
```typescript
import { AlertModule } from 'ngx-bootstrap/alert';
import { ModalModule } from 'ngx-bootstrap/modal';
...
@NgModule({
...
imports: [AlertModule.forRoot(), ModalModule.forRoot(), ... ],
...
})
```
## 3. Edit rollup configuration (rollup-config.js)
When using RxJS, remember to use CommonJS rollup plugin. If not installed, install it by:
```bash
npm install rollup-plugin-commonjs --save --dev
```
Then, import the CommonJS plugin, include it in the plugins array and add ngx-bootstrap to the list of modules:
```javascript
...
import commonjs from 'rollup-plugin-commonjs';
...
//paths are relative to the execution path
export default {
...
plugins: [
...
commonjs({
include: [
'node_modules/rxjs/**',
'node_modules/ngx-bootstrap/**'
]
}),
...
]
}
```
## 4. Run compilation the usual way
e.g.:
```bash
ngc -p tsconfig-aot.json
rollup -c rollup-config.js
```
# Using with Bootstrap and angular-cli
This is extracted from the [angular-cli include bootstrap story](https://github.com/angular/angular-cli/wiki/stories-include-bootstrap) and demonstrates one way to accomplish using Bootstrap 3 or 4 with ngx-bootstrap. The `Bootstrap's` version is defined automatically by the `ngx-bootstrap`.
## Installing angular-cli
*Recommended*: to use the latest stable `angular-cli` version.
*Note*: You can skip this part if you already have application generated by `ng-cli` and webpack.
```bash
npm i -g @angular/cli
ng new my-app
cd my-app
ng serve
```
## Adding ngx-bootstrap and Bootstrap
- install `ngx-bootstrap` and `Bootstrap`
```bash
npm install ngx-bootstrap bootstrap --save
```
## Using with css
### Configuring Project
Now that the project is set up it must be configured to include the Bootstrap CSS. You have two options:
- add styles to angular.json:
- Open the file angular.json from the root of your project.
- Under the property apps the first item in that array is the default application.
- There is a property styles which allows external global styles to be applied to your application.
- Specify the path to bootstrap.min.css
It should look like the following when you are done:
```
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"styles.css"
],
```
Note: When you make changes to angular.json you will need to re-start ng serve to pick up configuration changes.
- add styles to index.html:
- for Bootstrap 3:
```
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
```
- or for Bootstrap 4:
```
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
```
## Using SASS
### Configuring Project
Ensure that the project is set up to use scss by default and that the main styles file is styles.scss
The easiest way to do this is when creating a new project by
```bash
ng new my-app --style=scss
cd my-app
```
If the project has already been created then
- rename `src/styles.css` to `src/styles.scss`
- in `angular.json` make the following changes
```
"styles": [
"styles.css" <-- rename this from .css to .scss
],
.
.
.
"defaults": {
"styleExt": "css" <-- set this to default to .scss
}
```
Create an empty file `_variables.scss` in `src/`.
In `styles.scss` add the following:
```
@import 'variables';
@import '../node_modules/bootstrap/scss/bootstrap';
```
## Checkout
Open `src/app/app.module.ts` and add
```typescript
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
...
@NgModule({
...
imports: [BsDropdownModule.forRoot(), ... ],
...
})
```
- open `src/app/app.component.html` and add
```
<div class="btn-group" dropdown>
<button dropdownToggle type="button" class="btn btn-primary dropdown-toggle">
Button dropdown <span class="caret"></span>
</button>
<ul *dropdownMenu class="dropdown-menu" role="menu">
<li role="menuitem"><a class="dropdown-item" href="#">Action</a></li>
<li role="menuitem"><a class="dropdown-item" href="#">Another action</a></li>
<li role="menuitem"><a class="dropdown-item" href="#">Something else here</a></li>
<li class="divider dropdown-divider"></li>
<li role="menuitem"><a class="dropdown-item" href="#">Separated link</a>
</li>
</ul>
</div>
```
run the app in demo mode and ensure the dropdown button functions correctly.
### Getting started with angular-cli
#### Installing angular-cli
> _Note_: you can skip this part if you already have application generated by `ng-cli` and webpack
```bash
npm i -g @angular/cli
ng new my-app
cd my-app
ng serve
```
#### Adding ngx-bootstrap
- Install `ngx-bootstrap` and `bootstrap`
```bash
npm install ngx-bootstrap bootstrap --save
```
- Open `src/app/app.module.ts` and add:
```typescript
import { AlertModule } from 'ngx-bootstrap';
...
@NgModule({
...
imports: [AlertModule.forRoot(), ... ],
...
})
```
- Open `angular.json` and insert a new entry into the styles array:
```json
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
"styles.css",
],
```
- Open `src/app/app.component.html` and add:
```html
<alert type="success">hello</alert>
```
<a href="http://valor-software.com/ngx-bootstrap/#/">
<h1 align="center">ngx-bootstrap</h1>
<div align="center">
<img class="mx-auto center-block d-block" src="https://valor-software.com/ngx-bootstrap/assets/images/logos/ngx-bootstrap-logo.svg" alt="ngx-bootstrap" width="200" height="200">
<h1>ngx-bootstrap</h1>
</div>
</a>
Server side rendered version of this documentation available
<a href="https://ngx-universal.herokuapp.com/">here</a> served with Angular universal and <a href="https://nestjs.com">nest.js</a>
<p align="center">
Best way to quickly integrate <a href="https://getbootstrap.com/">Bootstrap 3</a> or <a href="https://getbootstrap.com/docs/4.0">Bootstrap 4</a> Components with <a href="https://angular.io/">Angular</a>
......@@ -11,7 +12,6 @@ Best way to quickly integrate <a href="https://getbootstrap.com/">Bootstrap 3</a
<p align="center">
<a href="https://badge.fury.io/js/ngx-bootstrap"><img src="https://badge.fury.io/js/ngx-bootstrap.svg" alt="npm version" ></a>
<a href="https://npmjs.org/ngx-bootstrap"><img src="https://img.shields.io/npm/dm/ngx-bootstrap.svg" alt="npm downloads" ></a>
<a href="https://travis-ci.org/valor-software/ngx-bootstrap"><img alt="" src="https://travis-ci.com/valor-software/ngx-bootstrap.svg?branch=development"></a>
<a target="_blank" href="https://opencollective.com/ngx-bootstrap"><img src="https://opencollective.com/ngx-bootstrap/tiers/backer/badge.svg?label=backer&color=brightgreen" /></a>
<br/>
......@@ -28,24 +28,32 @@ Best way to quickly integrate <a href="https://getbootstrap.com/">Bootstrap 3</a
<!-- [![codecov](https://codecov.io/gh/valor-software/ngx-bootstrap/branch/development/graph/badge.svg)](https://codecov.io/gh/valor-software/ngx-bootstrap) -->
<!-- [![NPM](https://nodei.co/npm/ngx-bootstrap.png?downloads=true&downloadRank=true&stars=true)](https://npmjs.org/ngx-bootstrap)
[![NPM](https://nodei.co/npm-dl/ngx-bootstrap.png?height=3&months=6)](https://npmjs.org/ngx-bootstrap)
[![Sauce Test Status](https://saucelabs.com/browser-matrix/valorkin.svg)](https://saucelabs.com/u/valorkin)
<!-- [![Sauce Test Status](https://saucelabs.com/browser-matrix/valorkin.svg)](https://saucelabs.com/u/valorkin)
-->
## Table of contents
1. [Getting Started](#getting-started)
2. [Supporting](#supporting-ngx-bootstrap)
3. [Installation instructions](#installation-instructions)
4. [Usage & Demo](#usage--demo)
5. [API](#api)
6. [Compatibility](#compatibility)
7. [Troubleshooting](#troubleshooting)
8. [Contributing](#contribution)
2. [Usage & Demo](#usage--demo)
3. [Supporting](#supporting-ngx-bootstrap)
4. [Installation](#installation)
5. [Compatibility](#compatibility)
6. [Troubleshooting](#troubleshooting)
7. [Contributing](#contribution)
8. [Credits](#credits)
9. [License](#license)
## Getting Started
ngx-bootstrap contains all core (and not only) Bootstrap components powered by Angular. So you don't need to include original JS components, but we are using markup and CSS provided by Bootstrap.
ngx-bootstrap provides Bootstrap components powered by Angular, so you don't need to include original JS components.
Check our [Getting started guide](https://valor-software.com/ngx-bootstrap/#/documentation#getting-started) if it's your first project with Angular Bootstrap.
## Usage & Demo
Bootstrap components for Angular applications, dozens of demos and API documentation could be found here:
[https://valor-software.com/ngx-bootstrap/](https://valor-software.com/ngx-bootstrap/).
<!-- Server side rendered version of this documentation available <a href="https://ngx-universal.herokuapp.com/">here</a> served with Angular universal and [nest.js](https://nestjs.com/). -->
## Supporting NGX-Bootstrap
ngx-bootstrap is an Open Source (MIT Licensed) project, it's an independent project with ongoing development made possible thanks to the support of our awesome backers.
......@@ -56,14 +64,22 @@ All donated funds are managed transparently on OpenCollective and will be used s
What's there for you? Proper recognition and exposure of your name/logo/website on our page.
Our main sponsors will be presented under this section! Be the first!
## Installation instructions
##### Method 1
## Installation
##### Angular CLI way
Use the Angular CLI ng add command for updating your Angular project.
```bash
ng add ngx-bootstrap
```
##### Manual way
Install `ngx-bootstrap` from `npm`:
```bash
npm install ngx-bootstrap --save
```
Add needed package to NgModule imports:
Add wanted package to NgModule imports:
```
import { TooltipModule } from 'ngx-bootstrap/tooltip';
......@@ -82,7 +98,7 @@ Add component to your page:
</button>
```
You will need bootstrap styles:
You will need to add bootstrap css:
- `Bootstrap 3`
```
<!-- index.html -->
......@@ -94,24 +110,13 @@ You will need bootstrap styles:
<!--- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
```
##### Method 2
Use the Angular CLI ng add command for updating your Angular project.
```bash
ng add ngx-bootstrap
```
Or use `ng add` to add needed component (for example tooltip).
```bash
ng add ngx-bootstrap --component tooltip
```
Add component to your page:
```
<button type="button" class="btn btn-primary"
tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Simple demo
</button>
```
### Setting up the bootstrap version manually
As you may know `ngx-bootstrap` support several `bootstrap.css` versions at the same time and has automatic tool to guess current used version of library, but if this guess fails you can specify version of `bootstrap.css` manually.
Sometimes, your project might contain some library that could interfere with the bootstrap framework, or you might have a customized version of bootstrap. The consequence is that the process of determining bootstrap version might be failed, which can break the UI. In that case, we can still set the bootstrap version manually in the bootstrapping component (i.e. `AppComponent`):
```
import { setTheme } from 'ngx-bootstrap/utils';
......@@ -125,54 +130,17 @@ export class AppComponent {
}
```
## Usage & Demo
Main source of API documentation and usage scenarios available here:
[https://valor-software.com/ngx-bootstrap/](https://valor-software.com/ngx-bootstrap/).
Additionally you can find demos and docs deployed from latest code with <a href="https://ngx-bootstrap.surge.sh/">angular@latest</a> and <a
href="https://ngx-bootstrap-latest.surge.sh/">angular@next</a>.
Server side rendered version of this documentation available <a href="https://ngx-universal.herokuapp.com/">here</a> served with Angular universal and [nest.js](https://nestjs.com/).
## API
Check demo page for API [reference](https://valor-software.com/ngx-bootstrap/).
### How to use it with:
- `Bootstrap and angular-cli` please refer to [using-with-bootstrap-and-angular-cli](https://github.com/valor-software/ngx-bootstrap/tree/development/docs/getting-started/bootstrap.md)
- `angular-seed` please refer to [getting-started-with-angular-seed](https://github.com/valor-software/ngx-bootstrap/tree/development/docs/getting-started/angular-seed.md)
- `system.js` (and [angular2 quickstart](https://angular.io/docs/ts/latest/quickstart.html)) please checkout [sample repository](https://github.com/valor-software/angular2-quickstart)
- `plnkr` sample available [here](https://plnkr.co/edit/0NipkZrnckZZROAcnjzB?p=preview)
- `AoT using ngc and rollup` please refer to [ngx-bootstrap-with-aot](https://github.com/valor-software/ngx-bootstrap/tree/development/docs/getting-started/aot.md)
- `ASP.NET Core 2.0` please refer to [using-with-asp.net-core-2](https://github.com/csegyud/ASPNETCore_ngx-bootstrap_Sample/blob/master/README.md)
### How to build lib for development
First time:
- clone repository
- `npm install`
- `npm run build`
If you're using Windows, run:
- `npm run build.windows` instead of `npm run build`
- You will have to install [cwRsync](https://en.wikipedia.org/wiki/CwRsync) because one of
the scripts requires `rsync`
To update your fork and prepare it for local usage:
- `git pull upstream development`
- `rm -rf node_modules`
- `npm install`
- `npm run build`
To run the demo:
- `npm run demo.serve` _*// to serve local demo. This is for testing only, without watchers.*_
For local development run:
- `npm run build.watch` _*// in first terminal*_
- `ng serve` _*// in second*_
If you want to run the demo with Angular Universal:
- `npm run demo.serve-universal`
```bash
git clone https://github.com/valor-software/ngx-bootstrap.git
cd ngx-bootstrap
npm ci
npm run build
npm start
```
## Compatibility
......@@ -205,10 +173,6 @@ All contributions very welcome! And remember, contribution is not only PRs and c
Please read our [contribution guidelines](https://github.com/valor-software/ngx-bootstrap/blob/development/CONTRIBUTING.md).
### If you need more modules, check [here](https://github.com/valor-software/ng2-plans)
Please read central `ngx` modules [readme](https://github.com/valor-software/ng2-plans) for details, plans and approach.
### Credits
Crossbrowser testing sponsored by [Saucelabs](https://saucelabs.com/)
[<img src="https://avatars2.githubusercontent.com/u/88837?s=200&v=4" alt="Saucelabs" width="31" height="31">](https://saucelabs.com/)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment