-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
100 additions
and
196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
### Installation | ||
|
||
**NOTE**: please use `npm 3.*` (`(sudo) npm i -g npm@3`) | ||
### Installation instructions | ||
|
||
Install `ng2-bootstrap` from `npm` | ||
```bash | ||
npm install --save ng2-bootstrap | ||
npm install ng2-bootstrap --save | ||
``` | ||
|
||
Additionally you will need `moment.js` typings if you are planning to work with datepicker | ||
You will need Bootstrap styles | ||
|
||
```bash | ||
# install typings globally | ||
npm install -g typings | ||
# init typings if you don't have typings.json yet | ||
typings init | ||
# and install moment.js typings | ||
typings install moment --save | ||
``` | ||
<!-- index.html --> | ||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | ||
``` | ||
|
||
### How to use it with webpack? | ||
|
||
Please refer to [readme](https://github.com/valor-software/ng2-bootstrap#with-webpack-angularclassangular2-webpack-starter) | ||
|
||
### How to use it with system.js and angular2 quick start | ||
|
||
Please check this [instructions](https://github.com/valor-software/ng2-bootstrap#quick-start) | ||
## How to use it with: | ||
- `angular-cli` please refer to [getting-started-with-ng-cli](https://github.com/valor-software/ng2-bootstrap/tree/development/docs/ng-cli.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) | ||
- `webpack` you can view our demo page [source code](https://github.com/valor-software/ng2-bootstrap/tree/development/demo) | ||
- `plnkr` sample available [here](http://bit.ly/ng2-bootstrap-plnkr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
### Getting started with angular-cli | ||
|
||
#### Installing angular-cli | ||
|
||
*Important*: please check `angular-cli` version, it should be => "1.0.0-beta.16" | ||
|
||
*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 ng2-bootstrap | ||
|
||
- install `ng2-bootstrap` | ||
```bash | ||
npm install ng2-bootstrap --save | ||
``` | ||
|
||
- open `src/app/app.module.ts` and add | ||
```typescript | ||
import { AlertModule } from 'ng2-bootstrap/ng2-bootstrap'; | ||
... | ||
@NgModule({ | ||
... | ||
imports: [AlertModule, ... ], | ||
... | ||
}) | ||
``` | ||
- open `src/app/app.component.html` and add | ||
``` | ||
<alert type="success">hello</alert> | ||
``` | ||
- and last thing you need is css, open `src/index.html` and add link to Bootstrap css | ||
```html | ||
<head> | ||
... | ||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"> | ||
</head> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters