Some may say that using a CDN is the way to go, but for development purposes, I prefer to install Bootstrap as a dependency for WebStorm's intellesense alone. There are other packages out there that you can use such as ngx-bootstrap, but this is the bare bones Bootstrap with JavaScript files.

Run in your terminal:

npm install bootstrap@4.0.0-beta --save

And you need to install it's dependencies (jquery) and (popper)

npm install jquery@3.0.0 --save

npm install popper.js@^1.11.0 --save

If you want to use SASS rather than CSS use:

npm install bootstrap@4.0.0-beta --save --style=sass

Or if you want to only install for development purposes (want to use a CDN for production); This installs Boostrap 4, but also make sure you install jquery and popper as seen above with the --save-dev.

npm install bootstrap@4.0.0-beta --save-dev

Open up your angular-cli.json file and add the style and scripts.


    "styles": [
        "../node_modules/bootstrap/dist/css/bootstrap.min.css",
        "styles.css"
      ],
      "scripts": [
        "../node_modules/jquery/dist/jquery.slim.min.js",
        "../node_modules/popper.js/dist/umd/popper.min.js",
        "../node_modules/bootstrap/dist/js/bootstrap.min.js"
      ],

If you're using SASS use this config:


    "styles": [
        "styles.scss"
      ],
      "scripts": [
        "../node_modules/jquery/dist/jquery.slim.min.js",
        "../node_modules/popper.js/dist/umd/popper.min.js",
        "../node_modules/bootstrap/dist/js/bootstrap.min.js"
      ],

And with SASS you need to make one last step. Place the line below in your styles.scss file (imports bootstrap)

@import "../node_modules/bootstrap/scss/bootstrap"

Restart your server and you should be ready to code!

Extra Sass file configuration:

Create directory in: src/styles

Create files and place in that directory: _variables.scss, _custom.scss

Change: .angular-cli.json


          "styles": [
        "styles/styles.sass"
      ],

Import files into: styles.scss


@import "../../node_modules/bootstrap/scss/bootstrap"
@import "variables"
@import "custom"