Install bootstrap in your Angular 4 / 2 Project

Open CMD/Terminal

npm install --save bootstrap

In the Angular 2/4 folder structure you will find the angular-cli.json which is used for configuration, part of it as see below in the figure, the styles section which will be used to add the bootstrap.


When we did run the npm install bootstrap, it was added into the modules.

Copy the path and add it to the angular-cli.json, like below:



Now if you run again the project using ng serve you will notice that the bootstrap is now included, keep in mind if the project was already running you need to stop it and restart the "ng serve".