Skip to content

Commit

Permalink
chore(docs): Updated documentation for adding bootstrap with ng-cli (#…
Browse files Browse the repository at this point in the history
…1085)

* improved angular-cli doc

* Update ng-cli.md

Fixed error

* chore(docs): better to use BS 3 for now
  • Loading branch information
guidoffm authored and valorkin committed Oct 6, 2016
1 parent 3691757 commit bbd14da
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions docs/getting-started/ng-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ ng serve

#### Adding ng2-bootstrap

- install `ng2-bootstrap`
- install `ng2-bootstrap` and `bootstrap`

```bash
npm install ng2-bootstrap --save
npm install ng2-bootstrap bootstrap --save
```

- open `src/app/app.module.ts` and add

```typescript
import { AlertModule } from 'ng2-bootstrap/ng2-bootstrap';
...
Expand All @@ -32,15 +34,16 @@ import { AlertModule } from 'ng2-bootstrap/ng2-bootstrap';
})
```
- open `angular-cli.json` and insert a new entry into the styles array
```json
"styles": [
"styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
```
- 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>
```

0 comments on commit bbd14da

Please sign in to comment.