UNPKG

ng2-bootstrap

Version:
50 lines (36 loc) 924 B
### 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` and `bootstrap` ```bash npm install ng2-bootstrap bootstrap --save ``` - open `src/app/app.module.ts` and add ```typescript import { AlertModule } from 'ng2-bootstrap/ng2-bootstrap'; ... @NgModule({ ... imports: [AlertModule, ... ], ... }) ``` - 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> ```