valor-software/ng2-bootstrap

View on GitHub
docs/getting-started/ng-cli.md

Summary

Maintainability
Test Coverage
### 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-cli.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>
```