====== Bootstrap & ngx-bootstrap ====== [[https://getbootstrap.com]]\\ [[https://valor-software.com/ngx-bootstrap]] ===== Installation ===== ==== Projet Solo ==== npm install bootstrap ngx-bootstrap ou ng add bootstrap ngx-bootstrap ==== Projet Multi ==== ng add bootstrap ngx-bootstrap --project=app1 ng add bootstrap ngx-bootstrap --project=app2 ==== Utisisation de Bootstrap avec un fichier _variables.scss ==== Create an empty file ''_variables.scss'' in ''src/''. If you are using bootstrap-sass, add the following to ''_variables.scss'': $icon-font-path: '../node_modules/bootstrap-sass/assets/fonts/bootstrap/'; //changer les couleurs de base de Bootstrap $primary: #e83e8c; $warning: #fd7e14; $danger: #dc3545; In ''styles.scss'' add the following: @import 'variables'; @import '../node_modules/bootstrap/scss/bootstrap'; ==== Imports ==== Il faut intégrer les modules utilisés dans ''app.module.ts'' exemple : import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; ... @NgModule({ ... imports: [BsDropdownModule.forRoot(), ... ], ... })