Angular CLI stories give the answer at https://github.com/angular/angular-cli/wiki/stories-include-bootstrap , which I will describe below. Note that I have yet to figure out how this interacts with ng-bootstrap .
Create project:
ng new my-app --style=scss cd my-app
Install Bootstrap 4:
npm install bootstrap@next
Project setup
Create an empty _variables.scss file in src/ , in which your style modifications will change.
In styles.scss add the following:
@import 'variables'; @import '../node_modules/bootstrap/scss/bootstrap';
Test project
Open app.component.html and add the following markup:
<button class="btn btn-primary">Test Button</button>
When configuring the application, run ng serve to start the application in development mode. In the browser, navigate to localhost:4200 .
Make sure the button is styled in the bootstrap style. To ensure that your variables are used, open _variables.scss and add the following:
$brand-primary: red;
Return the browser to change the font color.
source share