xxxxxxxxxx
$ npm install --save bootstrap@3
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
xxxxxxxxxx
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.scss"
]
xxxxxxxxxx
1. npm install bootstrap
2. In angular.json file:
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css", //<--add this line
"src/styles.css"
],
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js" //<--and this line
]
xxxxxxxxxx
//1. Install ngx-bootstrap and bootstrap:
npm install ngx-bootstrap bootstrap --save
//2. Open src/app/app.module.ts and add:
import { AlertModule } from 'ngx-bootstrap';
@NgModule({
imports: [AlertModule.forRoot(), ],
})
//3. Open angular-cli.json
"styles": [
"styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
xxxxxxxxxx
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"styles.scss"
]